DS Paper

You might also like

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

UNITED COLLEGE OF ENGINEERING & RESEARCH, PRAYAGRAJ (010)

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.

Q1 Convert the following array into max-heap: [2]


436729815

Q2 Distinguish between internal sorting and external sorting. [2]

Q3 Discuss following with reference to graphs. [2]


(i) Directed graph
(ii) Undirected graph
(iii) Degree of vertex
(iv) Null graph
(v) Acyclic Graph
(vi) In-Degree
(vii) Out-Degree

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.

Q9 Consider the following undirected graph: [2]

a) Find the adjacency list representation of the graph.


Find a minimum cost spanning tree by Kruskal's algorithm.
Q10 What is searching? Compare the time complexities of various searching [2]
algorithms.

You might also like