Data Structure Practice Set
Data Structure Practice Set
Practice set
Note: Consider this practice set along with your MTE practice set. ETE Exam
will be on the whole syllabus. This set of questions is only covered after MTE
syllabus.
1. Define a queue. Explain its FIFO (First In, First Out) property.
2. Differentiate between different types of binary trees.
3. Differentiate between binary tree and threaded binary tree. write their fundamental
properties.
4. Compare and contrast a linear queue and a circular queue.
5. Illustrate stack and queue operations with an example. Analyze their time and space
complexities.
6. What is a priority queue? Discuss its significance and applications. Implement a priority
queue using a heap.
7. Contract MAX and MIN heap using the list {11, 15, 21, 2, 7, 18, 4, 23, 40, 1}
8. How can a stack and a queue be implemented using array and linked lists? Explain with
an example. Analyze the performance trade-offs between linked list and array-based
implementations.
9. Write a Java program to implement double-ended queues (deques). Write its
applications.
10. Explain how stacks can be used in memory management during recursion.
11. What is the maximum and minimum number of nodes in a binary tree of height h. Prove
your answer.
12. Explain how a stack is used to evaluate prefix and postfix expressions with an example.
13. Discuss the role of recursion in binary tree traversals.
14. Explain the process of pre-order, in-order, and post-order traversal of a binary tree.
Construct a binary tree using inorder and preorder sequence or inorder and postorder
sequences by taking a suitable example. Perform level-order traversal on the contracted
binary tree.
15. Write a java program to implement a queue using two stacks.
16. Define binary search tree (BST) and Illustrate insertion and deletion and searching
operations in a BST. Analyze their time complexities.
17. Which data structure is used for level-order traversal of a binary tree and how?
18. What will be the efficiency of using circular queues in managing fixed-size buffers.
19. Implement Heap sort. Analyze how time complexity of heap sort is O(nlogn).
20. Define Graph, adjacency matrix.