Bsc Csit Nepal

2072

Data Structures and Algorithms

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

Attempt any two questions: (2 x 10 = 20)

  1. What is binary search tree? Explain with an example. Write an algorithm to search, insert and delete node in binary search tree.
  2. What is Postfix expression? Write an algorithm to evaluate value of postfix expression. Trace the following expression into postfix expression.
    (A+B*C) D E/ F) + −
  3. What is circular queue? Write an algorithm and C function to implement Circular queue.

Attempt any eight questions: (8 x 5 = 40)

  1. What is Recursion? Write a recursive algorithm to implement binary search.
  2. Differentiate between array and pointer with example.
  3. What is an algorithm? Write down the features of an algorithm.
  4. How stack as ADT? Explain with example.
  5. Write an algorithm and C function to delete node in singly link list.
  6. Write an algorithm and C function for merge sort.
  7. What do you mean by graph traversal? Explain primes algorithm with example.
  8. Differentiate between selection sort and bubble sort.
  9. Write an algorithm to implement tower of Hanoi.
  10. Write short notes on:
    • a. Hashing
    • b. Doubly Link list