
Data Structures Cup 2025 (The Final Competition)
Authored by Fatimah Alzahrani
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Complete the missing line from the circular array EnQueue() algorithm?
1.If (isFull()) Then Display ("Queue is overflow”);
Return[End If]
2.Set Queue[ rear_index ] = value
3....................................................................................
4.Set Count = Count + 1
5.End
Set rear_index = rear_index + 1
Set rear_index = (rear_index + 1 ) mod size
Set front_index = (front_index + 1 ) mod size
Set rear_index = front_index % size
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which line completes the priority queue for removeMax() algorithm?
1.If (isEmpty()) return null;
2.Set temp = front_index
3..................................................................
4.Return temp;
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which algorithm is responsible for DeQueue in a circular linked list?
1.If (isEmpty ()) Then Display ("Queue is underflow ”);
Return; [End If]
2.Set front = front.Next
4.Set Count = Count -1
5.End
1.If (isEmpty ()) Then Display ("Queue is underflow ”);
Return; [End If]
2.Set rear= rear.Next
3.Set rear. Next = front
4.Set Count = Count -1
5.End
1.If (isEmpty ()) Then Display ("Queue is underflow ”);
Return; [End If]
2.Set front = front.Next
3.Set rear. Next = front
4.Set Count = Count -1
5.End
1.If (isEmpty ()) Then Display ("Queue is underflow ”);
Return; [End If]
2.Set front.Next=front
3.Set rear. Next = front
4.Set Count = Count -1
5.End
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Complete the following EnQueue algorithm using a linear linked-list to locate the correct position for inserting the new node in a priority queue?
1.Set Node newNode = new Node( value, key , null), Current = front, Prev =null
/* Missing Lines */
3. If (Prev=null) Then front = newNode, Else Prev.next=newNode [End If]
4. Set newNode.next = current
5. Set size=size+1
5.End
2.Repeat while (Current ! = null and key > Current.key )
1.Set Prev = Current;
2.Set Current = Current.next;
[ End Loop ]
2.Repeat while (Current = null and key < Current.key )
1.Set Prev = Current;
2.Set Current = Current.next;
[ End Loop ]
2.Repeat while (Current ! = null and key < Current.key )
1.Set Current=Prev;
2.Set Current = Current.next;
[ End Loop ]
2.Repeat while (Current ! = null and key < Current.key )
1.Set Prev = Current;
2.Set Current = Current.next;
[ End Loop ]
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the most suitable data structure when patients arrive at an emergency room, they are assessed and assigned based on the severity of their condition. Critical patients (such as those with life-threatening injuries) are treated before those with less urgent issues (like a mild cold), regardless of arrival time. This ensures that medical resources are allocated efficiently and lives are saved?
Tree
Circular Linked-List
Priority Queue
Stack
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the most suitable data structure for designing database indices, that enables fast searching, insertion, and deletion of records, which is critical for large databases where performance matters?
Stack
Binary Search Tree
Priority Queue
Graph
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
This algorithm is responsible for which type of binary tree traversal?
algorithm: fun
Input: BinaryTreeNodes
1.if (bt== null) return;
2.fun(bt.leftChild)
3.Display(bt.value)
4.fun(bt.rightChild)
5.End
Level-order
PostOrder
PreOrder
InOrder
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
OP2 MIDTERM EXAM P2
Quiz
•
University
20 questions
Thiết kế trình chiếu PowerPoint (41-60)
Quiz
•
University
15 questions
GIS Unit III
Quiz
•
University
20 questions
DBMS Quiz
Quiz
•
University
15 questions
Cache memory
Quiz
•
University
20 questions
Quiz Harian Gdevelop MPK
Quiz
•
University
15 questions
EDA PARTE 2
Quiz
•
University
15 questions
Pengetahuan Awal uC
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade
Discover more resources for Computers
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
20 questions
Endocrine System
Quiz
•
University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
30 questions
W25: PSYCH 250 - Exam 2 Practice
Quiz
•
University
5 questions
Inherited and Acquired Traits of Animals
Interactive video
•
4th Grade - University
20 questions
Implicit vs. Explicit
Quiz
•
6th Grade - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University
38 questions
Unit 8 Review - Absolutism & Revolution
Quiz
•
10th Grade - University