CACS201 Data Structures And Algorithms

Data Structures And Algorithms TU Board 2022 question paper

10 questionsSit this paper (timed)

Tribhuvan University

Bachelor of Computer Application

Semester 3 · TU Board 2022

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.

    What is abstract data type? Convert a$b*c-d+e/f/(g+h) into postfix expression using stack.

    5
  2. 3.

    What is linked list? Describe types of linked list. Write an algorithm to insert and delete node from beginning of doubly linked list.

    5
  3. 4.

    Describe Prim's algorithm to solve MST problem with suitable illustration.

    5
  4. 5.

    What is the limitation of linear queue over circular queue? Write an algorithm to insert and delete node in circular queue.

    5
  5. 6.

    What is hashing? Describe the types of collision resolution techniques with suitable example.

    5
  6. 7.

    Define divide and conquer algorithm. What is binary search? Write an algorithm to search an item using binary search with suitable illustration.

    5
  7. 8.

    What is minimax algorithm? Create Huffman Tree and calculate Huffman code for the following characters along with their frequencies using Huffman algorithm. Characters : A, E, I, O, U, S, T Frequencies: 10, 15, 12, 3, 4, 13, 1

    5

Group C

Attempt any TWO questions(2 × 10 = 20)

  1. 9.

    What is stack? List the application of the stack. Write an algorithm to perform PUSH and POP operation in stack. Describe linked list implementation of stack operations.

    10
  2. 10.

    What is external sorting? Explain heap sort algorithm and trace it to sort the data: 82, 90, 10, 12, 15, 77, 55, 23, 25, 32

    10
  3. 11.

    Differentiate between BST and AVL tree. Given the following AVL Tree: [figure in the original paper] Draw the resulting BST after 5 is removed, but before any rebalancing takes place. Label each node in the resulting tree with its balance factor. Replace a node with both children using an appropriate value from the node's left child.

    10

— The End —