Sei sulla pagina 1di 4

DEPARTMENT OF INFORMATION TECHNOLOGY

Subject: DATA STRUCTURES AND ALGORITHMS (IT2201) YEAR/SEMESTER : II Year/ III sem

Question Bank
UNIT III HASHING AND SETS PART - A

1. What is a hash function? 2. What is hashing? 3. What is linear probing? 4. Define Double Hashing. 5. What are the different collision resolving techniques? 6. Mention Different types of popular hash function. 7. What is open addressing? 8. What is Quadratic Probing? 9. What are the advantages and disadvantages of Linear Probing? 10. What is rehashing? 11. What is Collision? 12. What is separate chaining? 13. What are the advantages and disadvantages of separate chaining? 14. What are the problems overcome by rehashing? 15. Why do we need a hash table as a Data structure as compared to any other data structure? 16. What are the important factors to be considered in designing the hash function? 17. What is equivalence relation? 18. Define extendible hashing. 19. What are the two operations to identify the equivalence relation? 20. What are the three union operations performed in smart union algorithms? 21. What is arbitrary union? 22. What is union by size? 23. What is union by height? 24. What is path compression?
PART B

1. Explain arbitrary union and union by size with example. (8) 2. Given the input {4371,1323,6173,4199,4344,9679,1989} and a hash function of h(x)=x (mod 10) show the resulting i. Separate chaining hash table (8) ii. Open addressing hash table using linear probing. (8) 3. 4. 5. 6. Explain in detail the union by height with example. (write the routine also) Explain path compression with example. Explain open addressing hash table using quadratic probing with example. Explain open addressing hash table using double hashing with example. (8) (8) (8) (8)

7. Explain rehashing with example.


UNIT IV GRAPHS PART - A 1. Define Graph. 2. Define directed graph. 3. Define undirected graph. 4. Define weighted graph. 5. Define complete graph. 6. Define strongly connected graph. 7. Define path. 8. Define length. 9. Define loop. 10.Define simple path. 11.Define cycle. 12.Define degree and its types. 13.Define acyclic graph. 14.What are the two ways of representing a graph? 15.What is adjacency matrix? 16.What are the advantages and disadvantages of adjacency matrix? 17.What is adjacency list? 18.What is topological sort? 19.What is graph traversal and what are its types? 20.What is breadth first traversal? 21.What is shortest path algorithm and what are its types? 22.What is single source shortest path? 23.Define Dijkstras algorithm. 24.Define minimum spanning tree. 25.What is prims algorithm? 26.What is kruskals algorithm? 27.What is depth first search? 28.What are the applications of depth first search? 29.What is Biconnectivity? 30. What is an articulation point? 31.Define Euler path. 32.Define Euler circuit.

(8)

PART B

1. i) what is topological sort?

ii) write the steps to perform topological sort. iii) perform topological sorting for the following graph.

(2) (6) (8)

1 3 4

2 5

2. Explain unweighted shortest path and perform the unweighted shortest path
for the following graph. (16)

3. Perform Dijkstras Algorithm for the following graph.


(16)

1 3 4

2 5

4. Write Prims Algorithm and perform operations for the following graph. (16)

2 a 3 c 1 1 d b

5. Write Kruskals Algorithm and perform operations for the following graph.
(16)

1 3 4

2 5

Potrebbero piacerti anche