Professional Documents
Culture Documents
Assisgment 2 DAA
Assisgment 2 DAA
List of Questions
1 Sort the following list using quick sort algorithm:
<50, 40, 20, 60, 80, 100, 45, 70, 105, 30, 90, 75>
Also discuss worst and best case of quick sort algorithm using divide and conquer method.
2 Find the items selected and the total profit earned from the given information using appropriate
algorithm
C=35
5 Write the Kruskal’s Algorithm to find out Minimum Spanning Tree. Apply the same and find
MST for the graph given below.
6 Given arrival and departure times of all trains that reach a railway station, find the minimum
number of platforms required for the railway station so that no train waits. We are given two
arrays which represent arrival and departure times of trains that stop. Arr[] = {9:00, 9:40, 9:50,
11:00, 15:00, 18:00} dep[] = {9:10, 12:00, 11:20, 11:30, 19:00, 20:00}
7 Write Dijkstra’s Algorithm for shortest path. Use the algorithm to find the shortest path for the
following graph.