CACS201 Data Structures And Algorithms

Data Structures And Algorithms TU Board 2024 question paper

10 questionsSit this paper (timed)

Tribhuvan University

Bachelor of Computer Application

Semester 3 · TU Board 2024

Course Title: Data Structures And Algorithms (CACS201)

Full Marks: 60Pass Marks: 24Time: 3 hours

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

Group B

Attempt any SIX question.(6 × 5 = 30)

  1. 2.

    Differentiate between stack and queue. What are the general applications of a stack?

    5
  2. 3.

    What is a linked list? How doubly linked list is different from circular linked list? Explain with example.

    5
  3. 4.

    What is recursion and recursive function? Write a recursive function to compute Fibonacci number.

    5
  4. 5.

    How does collision occur during hashing? Explain any two hashing functions.

    5
  5. 6.

    What is an AVL tree? Create an AVL tree from the following data: 18, 12, 14, 8, 5, 25, 31, 24, 27

    5
  6. 7.

    What are deterministic and non-deterministic algorithms? Explain the use of Big Oh notation to measure the complexity of an algorithm with an example.

    5
  7. 8.

    Implement the quick sort to sort the following data items: 12, 1, 14, 7, 2, 10, 4, 7, 22, 6, 15

    5

Group C

Attempt any TWO questions(2 × 10 = 20)

  1. 9.

    What are the differences between linear queue and circular queue? Write an algorithm to enqueue and dequeue data elements in a circular queue.

    10
  2. 10.

    What is B-tree? How insertions and deletions of elements can be done in a B-tree.

    10
  3. 11.

    Explain the different ways to represent a graph. For the following graph use Prim's algorithm to find a minimum spanning tree starting from the node 'A'. [figure in the original paper]

    10

— The End —