Model QP-Data Structures and Algorithms
Model QP-Data Structures and Algorithms
SEMESTER II
4 In a queue, elements are added at the ____ and removed from the ____.
a. rear, front
b. front, rear
c. top, bottom
d. beginning, end
7 Which traversal technique is used in Binary Search Trees to retrieve data in sorted order?
a. Preorder
b. Postorder
c. Inorder
d. Level Order
8 What is the worst-case time complexity of searching in a binary search tree (unbalanced)?
a. O(n)
b. O(log n)
c. O(n log n)
d. O(1)
9 Which data structure is ideal for breadth-first traversal of a graph?
a. Stack
b. Priority Queue
c. Queue
d. Set
Section B
SHORT ANSWERS (5 Marks each)
[Please answer Any Four questions with 200-250 words per question] (4x5=20 Marks)’
1 What is a linked list? Explain the types of linked lists with examples.
2 What are the advantages of using the Quick Sort algorithm over Merge Sort?
4 Explain the working of a queue. What are its applications in real-world scenarios?
1. What is a Binary Search Tree (BST)? Explain insertion, deletion, and traversal operations with examples.
2. Discuss the role of hashing in file structures. Explain collision resolution methods.
3. Explain the working of external sorting techniques like merge sort for large datasets.
4. What do you Understand by Algorithm Complexity? Discuss Time and Space Complexity in detail by taking suitable
examples