data_structure_interview_questions_with_answers_fixed
data_structure_interview_questions_with_answers_fixed
Basic Level
1. What is an array?
5. What is a linked list? Explain its types (singly, doubly, and circular).
Intermediate Level
1. Explain how a stack works with an example.
3. How does a doubly linked list differ from a singly linked list?
4. What are the operations of a binary search tree (BST)?
5. Explain the difference between a binary tree and a binary search tree.
6. What are tree traversals? Explain pre-order, in-order, and post-order traversal.
11. What are the types of sorting algorithms? Name their time complexities.
Advanced Level
1. What is a Trie? How does it work?
2. What is the time complexity of performing a search, insertion, and deletion in a binary search tree
(BST)?
3. How does the AVL tree differ from a binary search tree (BST)?
4. Explain the difference between breadth-first search (BFS) and depth-first search (DFS) in a
graph.
5. What are the applications of Dijkstra's Algorithm?
11. What is the time complexity of sorting algorithms like merge sort, quick sort, and heap sort?
12. What is the space complexity of a recursive depth-first search (DFS) on a graph?
14. What are k-d trees and where are they used?
18. What are the Bellman-Ford and Floyd-Warshall algorithms used for?
19. How does the Knuth-Morris-Pratt (KMP) string matching algorithm work?
20. What are Segment Trees and Fenwick Trees (Binary Indexed Trees)?
21. How would you implement a hash map with constant time complexity?
22. Explain the Union-Find (Disjoint Set) data structure with path compression and union by rank.
23. What is the Z-Algorithm for string matching?
24. Explain bit manipulation techniques in data structures and their applications.