Professional Documents
Culture Documents
DS Paper
DS Paper
DS Paper
Department of CS/IT
Class Test (Third Semester)
Name of Subject :- Data Structure Subject Code: KCS-301
Time:-60 min MM:- 20
Note:- Attempt ALL questions. All questions carry equal marks.
Q4 Why is quick sort named as quick? Show the steps of quick sort on the [2]
following set of elements:
11 2 5 7 3 13 17 40 4 8 50 9
Select the last element as pivot element. Is it a stable sorting algorithm? Justify
Q5 Write an algorithm for the DFS and BFS of a graph? State its advantages and [2]
disadvantages.
Q6 What is hashing? Give the characteristics of hash function. Explain collision [2]
resolution techniques in hashing.
Q7 Explain the Prim's algorithm to find minimal spanning tree for the following graph: [2]
Q8 Describe merge sort method. Explain the complexities of merge [2]
sortmethod.