Mid-Term examination question paper set for Data Structures and Algorithms from the year 2081.

Tribhuvan University
Faculty of Humanities & Social Sciences
OFFICE OF THE DEAN
2025
Bachelor in Computer Applications

Paper detail Value
Course Data Structures and Algorithms
Code No. CACS201
Semester IIIrd
Full marks 60
Pass marks 24
Time 3 hours

Candidates are required to answer the questions in their own words as far as possible.

Group B

2. Create binary search tree for following list of elements 45, 30, 29, 88, 1, 1, 12, 7, 2, 6, 10 and display the In order traversal of that tree.

3. How is the limitation of linear queue solved by using circular queue? Write a function or an algorithm to insert an element in a circular queue.

4. What is merging? Write an algorithm for merge sort and sort the following data using merge sort algorithm: 45, 30, 29, 88, 1, 1, 12, 7, 2, 6, 10.

5. What do you mean by left and right rotation of a tree? Insert the given elements in an empty AVL tree by showing each step: 8, 6, 7, 4, 12, 10, 11, 9, 5

6. What is singly linked list? Explain with example and diagram the insertion on middle of singly linked list.

Group C

7. Define Stack as data structure. What are the operations used in stacks? Write a code to implement two main operations of stack.

8. What do you mean by Recursion? Explain the implementation of factorial and Fibonacci sequences with example.