ASSIGNMENT Ds

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Q1. Define connected and strongly connected graph. How a graph is different from tree?

Q2. Discuss the concept of "successor" and “predecessor” in Binary Search Tree.

Q3. What are the advantages of B+ tree over B-tree?

Q4. The following values are to be stored in a hash table


25, 42,96, 101, 102, 162, 197

Describe how the values are hashed by using division method of hashing with a table size of 7. Use
chaining as the method of collision resolution.

Q5. Write an algorithm for binary search. What are the conditions under which sequential search
of a list is preferred over binary search? Write an algorithm for searching a key from a sorted list
using binary search technique

Q6. Use quick sort algorithm to sort 15,22,30,10,15,64,1,3,9,2. Is it a stable sorting


algorithm - Justify.
Q7. Write a recursive C function for the merge sort.

Q8. Define tree, binary tree, complete binary tree and full binary tree. Write algorithms or
function to obtain traversals of a binary tree in preorder, postorder and inorder.

Q9. Draw a binary tree with following traversals:

Inorder: B C A E G D H F I J

Preorder: A B C D E G F H I J

Q10. Explain Huffman Algorithm. Construct Huffman tree for MAHARASHTRA with its optimal code.

Q11. Explain Binary search tree and its operation. Make a BST for the following numbers, show all
steps : 45, 32, 90, 34,68, 72, 15, 24, 30, 66, 11, 50, 10.

Q12. Write short notes on the concept of Hashing Technique and collision resolution technique.

Q13. Define AVL Trees. Describe all rotations in AVL tree. Construct AVL tree from the
following nodes: B, C, G, E, F, D, A.

Q14. Define B Tree. What are the applications of B-Tree? Draw a B-Tree of order 4 by
insertion of the following keys in order:

Z, U,A,I,W,L,P,X,C,J,D,M,T,B,Q,E,H,S,K,N,R,G,Y,F,O,V.

Q15. Write Warshall’s algorithm for all pair shortest path.


Q16. Execute Prim’s Kruskal’s algorithm.
Q17. Explain Dijkstra’s algorithm for finding the shortest path in a given graph with example.
Q18. State the operations on stack. Define them and give the diagrammatic representation.
Q19. Define hashing. Describe any two commonly used hash functions. Describe one method of
collision resolution.
Q20. Define Hashing. How do collisions happen during hashing? Explain the different techniques
resolving of collision.

You might also like