Data Structures Interview Questions (1)
Data Structures Interview Questions (1)
3. What is an Array?
Answer:
8. What is a Queue?
• Simple Queue
• Circular Queue
• Priority Queue
• Deque (Double-ended Queue)
Answer: A binary tree is a tree data structure where each node has
at most two children, referred to as the left child and the right child.
2
12. What is a Binary Search Tree (BST)?
Answer:
Answer:
3
18. Explain the concept of Recursion.
Answer: A doubly linked list is a linked list where each node has
two pointers: one to the next node and one to the previous node.
Answer:
Answer: A circular linked list is a linked list where the last node
points to the first node, forming a circle.
4
24. Explain Breadth-First Search (BFS) and Depth-First Search
(DFS).
Answer:
Answer:
5
• Post-order (Left, Right, Root)
Answer:
Answer:
6
• Stack Underflow: Occurs when trying to pop an element from
an empty stack.
7
42. What is the difference between a Stack and a Heap?
Answer:
8
49. What is the purpose of Depth-Limited Search (DLS)?