Updated_End_Term_Examination
Updated_End_Term_Examination
Max Marks: 60
General Instructions
• Follow the instructions given in each section.
1(ii) Which STL container provides constant time complexity for element access using a
key?
(a) vector
(b) map
(c) unordered_map
(d) list
1(v) Which of the following algorithms has the best average case complexity for sorting?
(a) Bubble Sort
(b) Quick Sort
(c) Insertion Sort
(d) Merge Sort
8. Compare and contrast `std::vector` and `std::deque` in terms of operations and usage.
9. Write a program to demonstrate the insertion and deletion operations in a singly linked
list.
13. Describe the different types of tree traversal algorithms and their applications.
SECTION-D (2x10=20 Marks)
(Answer any 3 questions. Each question carries 10 marks.)
15. Write a program to implement Merge Sort using recursion and explain its working step
by step.
16. Write a program to implement a queue using two stacks and explain its functionality.