0% found this document useful (0 votes)
4 views66 pages

DSA Final

The document outlines various topics related to data structures and algorithms, including graph traversal algorithms, minimum spanning trees, tree structures, and indexing methods. It includes specific tasks such as constructing AVL trees, applying Dijkstra’s Algorithm, and defining key terms related to graphs and trees. Additionally, it covers file organization methods and their advantages and disadvantages.

Uploaded by

simrandnagraj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views66 pages

DSA Final

The document outlines various topics related to data structures and algorithms, including graph traversal algorithms, minimum spanning trees, tree structures, and indexing methods. It includes specific tasks such as constructing AVL trees, applying Dijkstra’s Algorithm, and defining key terms related to graphs and trees. Additionally, it covers file organization methods and their advantages and disadvantages.

Uploaded by

simrandnagraj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 66

DSA

UNIT 3

1) Write an algorithm for depth first traversal of a graph


2) Construct the minimum spanning tree (MST) for the given graph using Prim’s Algorithm staring from vertex 6.
3) What is topological sorting? Find topological sorting of given graph.
4) Write an algorithm for breadth first traversal of a graph.
5) Using Prim’s Algorithm, find the cost of minimum spanning tree (MST) of the given graph starting from vertex
‘a’
6) Define the following terms : i) Complete Graph ii) Connected Graph iii) Subgraph
7) Write Floyd Warshall Algorithm
8) Apply Dijkstra’s Algorithm for the graph given below, and find the shortest path from node A to node C.
9) Define indegree & outdegree of a directed graph. Write degree for G1 & G2. Write indegree & outdegree of
each vertex for G3 graph.
10) Construct the minimum spanning tree (MST) for the given graph using Kruskal’s Algorithm.
11) Find the number of different topological orderings possible for the given graph
12) Elaborate following terminologies : i) Graph ii) Adjacency List iii) Adjacency Matrix
13) Differentiate between tree and graph
14) Write pseudo code for Floyd-Warshall algorithm.
15) Write Prim’s algorithm to find minimum spanning tree
16) Write the applications of : i) Graph ii) BFS iii) DFS
DSA
UNIT 4
17) Construct an AVL Tree by inserting numbers from 1 to 8
18) Define Red Black tree. List its properties. Give example of it.
19) Write functions for RR and RL rotation with respect to AVL tree.
20) Construct an AVL Tree for following data : 50, 25, 10, 5, 7, 3, 30, 20, 8, 15
21) Explain with example K dimensional tree.
22) Explain static and dynamic tree tables with suitable example.
23) Construct AVL tree for insertion of following data 9, 15, 20, 8, 7, 13, 10.
24) Draw splay tree after
25) Create 2D tree for following data: (3, 6), (17, 15), (13, 15), (6, 12), (9, 1) (2,7), (10, 19). Also plot all the points
in XY plane.

Y
26) Construct AVL tree for insertion of following data: 63, 9, 19, 27, 18, 108, 99, 81
27) Write the functions for split & skew operations in AA tree.
28) Explain following terms w.r.t. symbol table : i) Insert & lookup operations ii) Advantages iii) Disadvantages
29) Construct an AVL tree having the following elements : H, I, J, B, A, E, C, F, D, G
30) Insert 15, 10, 17, 7 in splay tree.
31) What is the need of AA tree? List the five invariants that AA tree must satisfy.
32) Who developed K-D tree? What is the purpose of K-O tree? Insert step by step (7, 8), (12, 3), (14, 1), (4, 12), (9,
1), (2, 7) and (10, 19) into K-D tree.
33) Show the balanced AVL tree after deletion of mentioned node : i) Delete 30 ii) Delete 55 iii) Delete 60
DSA
UNIT 5
34) Construct a B-Tree of order 3 by inserting numbers from 1 to 10.
35) Explain following primary index, Secondary index, Sparse index and Dense index with example.
36) Construct a B Tree of order 5 with the following data : D H Z K B P Q E A S W T C L N Y M
37) What is trie tree? Explain insert and search operation on it.
38) Create a B- Tree of order 5 from the following list of data items: 30, 20, 35, 95, 15, 60, 55, 25, 5, 65, 70, 10, 40,
50, 80, 45
39) Create a B+Tree of order 3 from the following list of data items: 1, 3, 5, 7, 9, 2, 4, 6, 8, 10
40) Define trie tree. Compare trie tree with hash table. Draw trie tree for following data: bear, sell, bell, bid, stock,
bull, buy, stop.
41) What is indexing? What are the advantages of indexing? Discuss clustering index with example.
42) Construct a B-Tree of order 3 for following data : 50, 30, 21, 90, 10, 13, 20, 70, 25, 92, 80.
43) Why B+ tree? List its properties and advantages.
44) Build B+ tree of order 3 for the following : F, S, Q, K, C, L, H, T, V, W, M, R
DSA
UNIT 5
45) Explain multilist files & coral rings.
46) What is Sequential and index sequential file organization? State its advantages and disadvantages
47) Explain inverted file & cellular partitions.
48) Explain direct access file organization. State its advantages and disadvantages
49) What is linked organization? Explain inverted file and coral rings with respect to linked organization.
50) List & explain two possible ways of representing records
51) Differentiate between indexed sequential file and direct access file.

You might also like