Gadgets 4 Students Career Guide Free Tutorials  Go to Your University  Placement Preparation 
0 like 0 dislike
40.2k views
in Examples, Exercises and Projects by (562 points)
edited by

MCQ's on Data Structure &Algorithms(DSA) along with answers most frequently asked in both company's placement preparation and college semester examinations.

2 Answers

0 like 0 dislike
by (562 points)
selected by
 
Best answer

1)Process of inserting an elements at the end of queue is known as? 

a)Dequeue

b) Enqueue

c)Push

d) Pop

Ans:b(Enqueue) 


2) Returns the element at front without removing it 

a) Enqueue

b) Dequeue

c) int Front() 

d) None of these

Ans:c(int Front()) 


3) The maximum size of the queue ? 

a) can be changed

b) cannot be change

c) independent

d) None of these

Ans:b(cannot be changed) 


4) What is the most appropriate data structure to print elements of queue in reverse order? 

a) Stack

b) List

c) Sorting

d) None of these

Ans:a(Stack) 


5) Process of Dequeuing an empty queue is called

a) Underflow

b) Overflow

c) Skip lists

d) none of these

Ans:a(Underflow) 


6) Process of Enqueuing an element in a full queue is called

a) Underflow

b) Overflow

c) Skip lists

d) None of these

Ans:b(Overflow) 


7) A normal queue, if implemented using an array of size MAX_SIZE, gets full when

a) Rear=MAX_SIZE-1

b) Front=(rear+1)mod MAX_SIZE

c) Front=rear+1

d) Rear=front

Ans:a(Rear=MAX_SIZE-1


8) What is the worst case time complexity of a sequence of n queue operations on an initially empty queue?

a) θ (n)

b) θ (n + k)

c) θ (nk)

d) θ (n2)

Ans:a(∅(n)) 


9)  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?

a) ABCD

b) DCBA

c) DCAB

d) ABCD

Ans:a(ABCD) 


10)  A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known as a ?

a) Queue

b) Stack

c) Tree

d) Linked list

Ans:a(Queue) 


11) Define circular queue. 

Ans:A circular queue is one in which the insertion of a new element is done at the very first location of the queue if the last location of the queue is full. 


12) Queue where insertion and deletion performed from both ends

a) Circular queue

b) Doubly circular queue

c) Double Ended queue

d) none of these

Ans:c(Double ended queue) 


13) What is input restricted dequeue? 

Ans:In input restricted dequeue , insertion can be done only in rear end whereas deletion can be done in both rear and front end. 


14) Name dequeue in which insertion can be done from bith rear and front end. 

a) Output restricted dequeue

b) Input restricted dequeue

c) Double ended queue

d) none of these

Ans:a(Output restricted dequeue) 


15) Which function is used to return the value of first element without dequeueing it? 

a) peek() 

b) typedef

c) id

d) none of these

Ans:a(peek()) 


16) Define priority queue. 

Ans:A priority queue is another variation of queue structure. Here, each element has been assigned a value, called priority of the element. 


17) Name few ways of implementing structure of a priority queue. 

Ans:

  • Using a simple/circular array
  • Multi-queue implementation
  • Using a double linked list
  • Using a heap tree

18) List few applications of queue. 

Ans:

  • It is used to schedule the jobs to be processed by the CPU. 
  • Surving request on the single shared resources like a printer, cpu, scheduling, etc. 
  • Breadth first search[BFS] uses a queue data structure to find an element from a graph. 

19) push() and pop() functions are found in

a) queues

b) lists

c) stacks

d) trees

Ans:c(stacks) 


20) Minimum number of queues required for priority queue implementation?

a) 5

b) 4

c) 3

d) 2

Ans:d(2) 


0 like 0 dislike
by Goeduhub's Expert (9.3k points)
edited by

Learn & Improve In-Demand Data Skills Online in this Summer With  These High Quality Courses[Recommended by GOEDUHUB]:-

Best Data Science Online Courses[Lists] on:-

Claim your 10 Days FREE Trial for Pluralsight.

Best Data Science Courses on Datacamp
Best Data Science Courses on Coursera
Best Data Science Courses on Udemy
Best Data Science Courses on Pluralsight
Best Data Science Courses & Microdegrees on Udacity
Best Artificial Intelligence[AI] Courses on Coursera
Best Machine Learning[ML] Courses on Coursera
Best Python Programming Courses on Coursera
Best Artificial Intelligence[AI] Courses on Udemy
Best Python Programming Courses on Udemy

 Important Lists:

Important Lists, Exams & Cutoffs Exams after Graduation PSUs

 Goeduhub:

About Us | Contact Us || Terms & Conditions | Privacy Policy || Youtube Channel || Telegram Channel © goeduhub.com Social::   |  | 

 

Free Online Directory
...