DS Assignment
Q1. What is the significance of binary tree in Huffman Algorithm.
Q2. What is the number of edges in a regular graph of degree d and n vertices.
Q3. Find the shortest path from source vertex A to all the vertices of the given graph using
Dijkstra’s algorithm.
Q4. Write a C program for sorting 100 integer numbers using selection sort procedure
procedure.
Q5. Write advantages of AVL tree over Binary Search Tree (BST).
Q6. Differentiate between DFS and BFS. Draw the breadth First Tree for the above graph.
Q7. Use quick sort algorithm to sort 15,22,30,10,15,64,1,3,9,2. Is it a stable sorting
algorithm?
Q8. (i) Why does time complexity of search operation in B-Tree is better than Binary Search
Tree (BST)?
(ii) Insert the following keys into an initially empty B-tree of order 5 a, g, f, b, k, d, h, m, j, e,
s, i, r, x, c, l, n, t, u, p
(iii) What will be the resultant B-Tree after deleting keys j, t and d in sequence?
Q9. Apply Prim’s algorithm to find a minimum spanning tree in the following weighted graph
as shown below.
Q10. Differentiate between liner and binary search algorithm. Write a recursive function to
implement binary search.