DSA Question Bank
DSA Question Bank
2 marks Questions
48. A queue can be implemented using single linked list in two ways. One
implementation has front at head and rear at tail of linked list. Other implementation
has front at tail and rear at head of linked list. Which implementation among two is
efficient and why?
49. Define B Tree. Draw B Tree of order 5 for the following data-
92, 24, 6,7, 11,8, 22,4,5,16,19,20,78
50. Illustrate execution of Quick Sort ( in increasing order) for these given nos.
44,33,11,55,77,90,40,60,99,22, 88
51. Write algorithm for push, pop in a stack using array implementation
52. Write algorithm to insert and delete an element from array implementation of
circular queue.
53. What are the benefit and limitations of linked list?
54. Explain linear linked implementation of Stack and Queue?
55. What is a DeQueue? Explain its operation with example?
56. Describe the algorithms used to perform single and double rotation on AVL tree.
57. Create a binary search tree for the following numbers start from an empty binary
search tree. 45,26,10,60,70,30,40 Delete keys 10,60 and 45 one after the other and
show the trees at each stage.
58. Construct an expression tree for the expression (a+b*c) + ((d*e+f)*g). Give the
outputs when you apply inorder, preorder and postorder traversals.
59. Write complexities of Bubble sort, quick sort, merge sort, heap sort, insertion sort
and selection sort for best, worst and average case.
60. Given the input { 4371, 1323, 6173, 4199, 4344, 9679, 1989 } and a hash function
of h(X)=X (mod 10) show the resulting: a. Separate Chaining hash table b. Open
addressing hash table using linear probing
61. What are the advantages and disadvantages of various collision resolution
strategies?
62. Explain any two techniques to overcome hash collision
63. What are enqueue and dequeue operations? Write algorithm for these operations
64. Define asymptotic notations with graph and examples.
65. Write algorithm to evaluate post fix expression
66. The keys 12,18,13,2,3,23,5 and 15 are inserted into an initially empty hash table of
length 10 using open addressing with hash function h(k)=k mod 10 and linear
probing. What is the resultant Hash Table?( also show intermediate table)