Stack & Queue

Quiz
•
Computers
•
University
•
Hard
AKSHAY KUMAR
Used 1K+ times
FREE Resource
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in what order will they be removed?
ABCD
DCBA
DCAB
ABDC
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In linked list implementation of a queue, the important condition for a queue to be empty is?
FRONT is null
REAR is null
LINK is empty
None of the mentioned
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many stacks are needed to implement a queue. Consider the situation where no other data structure like arrays, linked list is available to you.
1
2
3
4
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many queues are needed to implement a stack. Consider the situation where no other data structure like arrays, linked list is available to you.
1
2
3
4
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is true about linked list implementation of queue?
In push operation, if new nodes are inserted at the beginning of linked list, then in pop operation, nodes must be removed from end.
In push operation, if new nodes are inserted at the end, then in pop operation, nodes must be removed from the beginning.
Both of the above
None of the above
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Suppose a circular queue of capacity (n – 1) elements is implemented with an array of n elements. Assume that the insertion and deletion operation are carried out using REAR and FRONT as array index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect queue full and queue empty are
Full: (REAR+1) mod n == FRONT, empty: REAR == FRONT
Full: (REAR+1) mod n == FRONT, empty: (FRONT+1) mod n == REAR
Full: REAR == FRONT, empty: (REAR+1) mod n == FRONT
Full: (FRONT+1) mod n == REAR, empty: REAR == FRONT
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Data Structures and Algorithms Quiz

Quiz
•
University
20 questions
TECHNICAL QUIZ

Quiz
•
University
12 questions
Analisis Struktur Data

Quiz
•
10th Grade - University
15 questions
Data Structure

Quiz
•
University
15 questions
NSCC-CODE TO COIN

Quiz
•
University
15 questions
AS Computing: Data Structures

Quiz
•
10th Grade - University
20 questions
Collections C#

Quiz
•
University
20 questions
UTS Algoritma dan Struktur Data

Quiz
•
University
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade