
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
Similar Resources on Wayground
20 questions
js DOM

Quiz
•
12th Grade - Professi...
20 questions
6. Kubernetes Networking & Services

Quiz
•
University
15 questions
Firewall and Network Security

Quiz
•
University
18 questions
U3.1. Connections (JDBC)

Quiz
•
University
25 questions
BDA-UNIT-2

Quiz
•
University
18 questions
Lenguaje de Definición de Datos

Quiz
•
University
15 questions
Arrays and Linked Lists

Quiz
•
University
20 questions
ASD - A

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University