Queue Interview Questions

 
A queue is a particular kind of abstract data type or collection in which the entities in the collection are kept in order and the principal (or only) operations on the collection are the addition of entities to the rear terminal position, known as enqueue, and removal of entities from the front terminal position, known as dequeue.

Queue is a First-In-First-Out (FIFO) data structure. In a FIFO data structure, the first element added to the queue will be the first one to be removed. This is equivalent to the requirement that once a new element is added, all elements that were added before have to be removed before the new element can be removed. Often a peek or front operation is also entered, returning the value of the front element without dequeuing it. A queue is an example of a linear data structure, or more abstractly a sequential collection.

 
Below is the list of commonly asked interview questions that uses queue data structure-
 

  1. Chess Knight Problem – Find Shortest path from source to destination
     
  2. Shortest path in a Maze | Lee algorithm
     
  3. Find shortest safe route in a field with sensors present
     
  4. Flood fill Algorithm
     
  5. Count the number of islands
     
  6. Find Shortest path from source to destination in a matrix that satisfies given constraints
     
  7. Generate binary numbers between 1 to N
     
  8. Calculate height of a binary tree | Iterative & Recursive
     
  9. Delete given Binary Tree | Iterative & Recursive
     
  10. Level Order Traversal of Binary Tree
     
  11. Spiral Order Traversal of Binary Tree
     
  12. Reverse Level Order Traversal of Binary Tree
     
  13. Print all nodes of a given binary tree in specific order
     
  14. Print left view of binary tree
     
  15. Find next node in same level for given node in a binary tree
     
  16. Check if given binary tree is complete binary tree or not
     
  17. Print Diagonal Traversal of Binary Tree
     
  18. Print corner nodes of every level in binary tree
     
  19. Breadth First Search (BFS) | Iterative & Recursive Implementation
     
  20. Minimum number of throws required to win Snake and Ladder game
     
  21. Check if an undirected graph contains cycle or not
     



 
 

Thank you all for your valuable time and being with us. 🙂