
Data Structures Cup 2025 (The Final Competition)
Quiz
•
Computers
•
University
•
Medium

Fatimah Alzahrani
Used 1+ times
FREE Resource
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
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
15 questions
Exercise 008
Quiz
•
University
18 questions
JavaScript Variables, Data Types, and Operators Quiz
Quiz
•
University
23 questions
Section 9: Networking (30-36)
Quiz
•
University
20 questions
Quiz PBO SIA
Quiz
•
University
20 questions
Node.js Server
Quiz
•
University
16 questions
DS - Linked List - S1
Quiz
•
University
16 questions
Linked List and Arrays in JAVA
Quiz
•
University
18 questions
CIS2303 Week 4_5 Ch_3
Quiz
•
University
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
Discover more resources for Computers
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms
Quiz
•
11th Grade - University
38 questions
Unit 6 Key Terms
Quiz
•
11th Grade - University
20 questions
La Hora
Quiz
•
9th Grade - University
7 questions
Cell Transport
Interactive video
•
11th Grade - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University