ADS IMP Qs
ADS IMP Qs
Question Bank
UNIT-1
1. List the operations performed in the Linear Data Structure?
2. Explain the difference between stack implementation using array and linked list?
3. Explain concatenation of singly linked lists.
4. List the advantages and disadvantages of doubly linked list over singly linked list?
5. Write ‘C code to insert and delete a key in a circular queue
6. Evaluate the following postfix expression: 6 2 3 + - 3 8 2 / + * 2 | 3 +
7. Explain DEQUEUE ADT and its operations
8. Convert following expression A+(B * C) – ((D * E +F) /G) in to post fix form.
9. Write a non-recursive algorithm to convert the given infix expression into postfix expression.
10. Explain about different representations of Dictionaries?
11. Explain about different linear list representations of Dictionaries with operations?
12. Explain about linear list representation and operations.
13. What is skip list? And its operations.
14. Define Hashing? Explain Hash Function?
15. What is collision? Explain different collision resolution techniques with examples
16. Analyze input (71, 23, 73, 19, 34, 69, 98) and hash function h(x)=x mod 10, Show the result
using quadratic probing, and double hashing h2(x)=7 - (x mod 7).
17. Analyze input (37, 32, 73, 99, 44, 79, 89) and hash function h(x)=x mod 10, Show the result
Separate Chaining, linear probing
UNIT-2
1. What are binary trees? Mention different types of binary trees with example
2. State the properties of a Binary Tree?
3. Discuss how to represent Binary Tree?
4. List the different tree traversals?
5. Discuss threaded binary tree? And types of threaded binary tree.
6. Define heap?
7. Define Priority Queue?
8. Differentiate Max-heap and Min-heap?
9. Differentiate max priority queue and min priority queue?
10. Construct max heap for the following elements: 41, 82 , 33 , 24 ,10 ,40 ,30 ,60 ,100 ,71 ,160 ,51 ,
130, 115, 120. Explain the technique
11. Define a Max Heap. Construct a max heap for the following: {12, 25, 19, 8, 15, 18, 7, 12, 25}
12. Explain with an example how to insert an element to max heap
13. Explain with an example how to delete an element from max heap
14. Construct a binary tree having the following traversal sequences:
a. Preorder traversal: A B C D E F G H I
b. Inorder traversal: B C A E D G H F I
15. Write inorder, preoreder, post order traversal of the following tree
UNIT-3
1. Define graph?
2. Discuss representation of graph with examples?
3. List the different graph traversals?
4. Differentiate BFS and DFS?
5. Explain different ways representation of graphs.
6. Explain BFS graphs traversal algorithms with suitable example.
7. Explain DFS graphs traversal algorithms with suitable example.
8. Differentiate BFS and DFS
9. Write the advantages of using BFS over DFS or using DFS over BFS?
10. Illustrate BFS and DFS traversals of following graph
UNIT-IV
1. Discuss Comparison of Search Trees.
2. Write the properties of Splay tree.
3. List the applications of Splay trees.
4. List the applications of B-trees.
5. What is red-black tree? Write properties of red-black tree.
6. Explain Recoloring and Rotations of red-black tree with an example.
7. Construct a B-tree of order 3 with the following elements 10,20,15,3,2,16,21,25,30,40 and after
creating of B-tree delete 15, 2, and 21.
8. Construct a B-tree of order 5 with the following of elements 4,40,23,50,11,34,62,78,66,22,90,59,
25,72,64, 77, 39, 12
9. What is splaying? Discuss the types of splaying.
10. What is B-Tree of order m.
11. What is B-tree? Explain properties and operations of B-tree with an example.
12. Construct red-black tree for following sequence of integers: 10,20,15,3,2,16,18,26.
UNIT-V
1. Construct standard and compressed trie for following strings = {pot, potato, pottery, tattoo,
tempo}.
2. Apply Brute force algorithm on Text: AAAAAAAAAAAAAAAAAAAAAAAAAAAH
Pattern: AAAAH
3. Explain about Compressed Tries and Suffix tries?
4. Construct suffix trie for the given string =”GOOGLE$”.
5. Consider the string = “GCATCGCAGAGAGTATACAGTACG” and search string is
“AGTATACA” by using the KMP algorithm.
6. What is trie? Explain the compressed trie with an example.
7. Find the failure function for the pattern ”abacbba”.
8. Define and discuss the properties of tries?
9. Define failure function in KMP algorithm?
10. List types of Tries? Explain with an example.
---------------------------------------------------------------------------------------------------------------------
Model paper
---------------------------------------------------------------------------------------------------------------------
1. a) List the advantages and disadvantages of doubly linked list over singly linked list?
b) List the applications of hashing?
c) List the advantages of priority queue? Explain the implementation of Priority Queue.?
d) Define threaded binary tree? Explain the impact of such a representation on the tree
traversal procedure?
e) Differentiate BFS and DFS.
f) Explain the height of an AVL Tree?
g) State the properties of Red-Black trees with example.
h) Compare different search trees with their time complexities
i) Explain about Knuth-Morris-Pratt algorithm with example?
j) Explain about Compressed Tries and Suffix tries?
2 a) Write a program to remove duplicate vales from a double linked list.
b) Analyze input (371, 323, 173, 199, 344, 679, 989) and hash function h(x)=x mod 10,
Show the result using quadratic probing, and double hashing h2(x)=7 - (x mod 7).
3 a) Define collision and discuss any two collision resolution techniques
b) Convert the following expression A + (B * C) - ((D * E + F) / G) into post form.
4 a) Define Binary tree? Explain Binary tree representations with an example.
b) Given a queue of elements with priorities: 21,13,17,10,7,11 do the following:
Build the binary heap (draw the tree at each step) and show the corresponding array
Delete the element with the highest priority, drawing the tree at each step of the deleting
procedure
Insert a new element with priority 15 and draw the tree at each step of the insertion
procedure
5 a) List the advantages of priority queue? Explain the implementation of Priority Queue.?
b) Write a C program that uses functions to perform the following:
o Create a binary search tree of integers.
o Traverse the above Binary search tree non recursively in inorder.
6 a) Write the advantages of using BFS over DFS or using DFS over BFS? What are the
applications and downsides of each?
b) Explain various rotations of AVL Trees maintaining balance factor while insertion takes place.
7 a) Construct AVL Tree for the following elements C,O,M,P,U,T,I,N,G
b) Define Graph and explain how graphs can be represented in adjacency matrix , adjacency
list and incidence matrix.
8 a) Construct a B-tree of order 7 with the following elements
4,40,23,50,11,34,62,78,66,22,90,59,25,72,64,77,39,12
b) Explain about Red-Black tree and Splay tree with example?