DS Important Questions
DS Important Questions
1. Compare Linear and Nonlinear data structures. List the real time applications of
linear data structure.
2. Evaluate the following Post Fix Expression using Stacks
6 5 2 3 + 8 * + 3 + *
3. Define a Singly Linked List node using Structure. Compare Singly Linked List and
Doubly Linked List.
4. Construct a binary tree from a given Inorder and Postorder sequence:
Inorder: D G B A H E I C F
Postorder: G D B H I E F C A
5. Write an algorithm for the BFS (Breadth First Search) graph traversal method. Apply
BFS on the following Graph.
6. List out various sorting techniques. Explain algorithm & working of Quick sort.
7. Write short note on ADT (Abstract Data Type) in data structure with examples.
8. Describe the application of stacks in conversion of infix to postfix expressions with
the help of following example,
K + L - M*N + (O^P) * W/U/V * T + Q
16. Construct a minimum spanning tree and calculate its cost for the graph given in Fig.
Start the Prim’s algorithm from vertex D.
17. Write the steps to sort the given numbers using insertion sort, illustrate with example.
18. Explain the searching process in binary search with an example.
19. What are advantages of Circular queue over Linear queue. Explain Circular Queue in
Detail.
20. Write an algorithm to add two polynomial expressions represented using linked list
and apply it to solve addition of following polynomial expressions : P(x) = 3x4 + 2x3
- 4 x2 + 7 and Q (x) = 5x3 + 4 x2 – 5
21. Construct a AVL tree by inserting the following elements in the given order : 63, 9,
19, 27, 18, 108, 99, 81
22. Write a Menu driven program using C functions to implement Singly Linked List that
performs following operations:
1. Insert a node at the beginning
2. Delete a node after a given node.
3. Display the list.
23. What is balance factor in tree? Discuss the rules to construct a AVL tree. and construct
an AVL tree by inserting the following elements in the given order. 63, 9, 19, 27, 18,
108, 99, 81.
24. Consider a hash table of size 10. Using quadratic probing, insert the keys 72, 27, 36,
24, 63, 81, and 101 into the table. Take c1 = 1 and c2 = 3. Show how many collisions
occur in this technique.
25. Find the number of different topological orderings possible for the given graph-
26. Compare binary search with Linear search? Write the algorithm for binary search.
27. Discuss need of Huffman coding. Design a Huffman Tree and codewords for the word
“MAHARASHTRA” showing all intermediate steps.
28. Write a Menu driven program using C functions to implement Singly Linked List that
performs following operations:
1. Insert a node from beginning
2. Delete a node from end
3. Display the list.
29. Consider a hash table of size 10. Using Linear and quadratic probing, insert the keys
72,27, 36, 24, 63, 81, and 101 into the table. Take c1 = 1 and c2 = 3. Show how many
collisions occur in each of these techniques.