Bsc Csit Nepal

2068

Data Structures and Algorithms

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

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

  1. Define Queue as an ADT. Write a program for basic operations in Linear queue in array implementation.
  2. Why recursion is required? Explain with Tower-of-Hanoi example. How recursive algorithm makes program effective? Write the merits and demerits of recursion in Programming.
  3. Explain In-fix to Postfix Conversion Algorithm. Illustrate it with an example. What changes should be made for converting postfix to prefix.

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

  1. Explain Kruskal’s algorithm with example.
  2. Write a program in C for bubble sorting.
  3. Differentiate between contiguous list and linked list with examples.
  4. Explain binary search. Illustrate it with example.
  5. Explain hashing with example.
  6. Explain why linked list is called dynamic list? Write the algorithm for deleting a new node before a node.
  7. Explain the characteristics of Huffman’s algorithm and its application.
  8. Write merits and demerits of recursive function over non-recursive function.
  9. Write the steps involved in deleting a node in a Binary selection tree.
  10. Discuss merge sort. How you rate this sorting from selection sort?