Dsa Assignment
Dsa Assignment
Dsa Assignment
DEPT
DSA ASSIGNMENT
ASSIGNMENT-1
ASSIGNMENT-2
ASSIGNEMT-3
Sorting
1. Name two divide and conquer algorithms for sorting.
2. Apply quick sort algorithm to sort the following data. Justify the steps. 42,
29, 74, 11, 65, 58
3. Write a ‘C’ program for insertion sort and discuss its efficiency.
4. Write an algorithm/C Function to implement Selection Sort Method.
5. Write an algorithm/C Function to implement Bubble Sort Method.
6. Write an algorithm/C Function to implement Quick Sort Method.
7. Write an algorithm/C Function to implement Merge Sort Method.
8. Using Quick sort give tracing for following set of numbers 42,
11,23,58,65,72,36,99.
Searching
8. Why is Threaded binary tree required? Draw a right in threaded binary tree for the given tree in Fig.1
12. Insert 1, 29, 32 and 13 in the following Height balanced tree. For each insertion, draw the
balanced tree using AVL rotation.
Graph:
1. Consider the graph shown in below figure. Find depth-first and breadth first traversals of this
graph starting at A
.
2. Explain the breadth first search and depth first search tree traversal on the following graph.
DAVIET CSE
DEPT
3. Obtain the adjacency matrix A for the following graph. ..
File Structures
1. Explain the terms: File, Field, Record, Database, Key.
2. (i) Explain the structure of sequential file.
(ii) Explain the structure of indexed sequential files.
3. What is File Structure? State different File Organizations and discuss the advantages and
disadvantages of each of them.
4. Explain various multiple key access file organization in brief with advantages and
disadvantages of each method.