# DATA STRUCTURES QUESTIONS (1) Reversing a linked list (2) Traversals of binary tree (3) traversals of graph (4) Time complexity (5) deleting a node

from a binary search tree (6) What data structure will you use for DFS,BFS? (7) Various sorting techniques. Write algo for any sorting. (10) What is hashing? (11) How do u detect a loop in a linked list? (12) Which sorting technique has the least worst case? --> heap sort. (13) code for Tower of Hanoi (14) Prefix and Postfix (15) Multiplication of number ( Recusive) Ans: a*b=a if b==1 a*b=a * (b-1) + a if b>1 (16) Recusive solution (trace the stack) (17) Preorder and postorder traversals (18) How to check out that graph is connected or not? (19) A binary search tree is given. Tell the 4th smallest value in it. (20) How can you insert different types of elements in one stack? We know the various types of elements that can be stored on the stack. (21) How will you sort a linked list?

(22) A list is ordered from smaller to largest when a sort is called. Which sort would take the shortest time to execute? (23) There are 8, 15, 13, and 14 nodes in 4 different trees. Which one of them can form a full binary tree? (24) Write code to sort a list such that all odd numbers come first, then all even numbers. (25) Deleting a node when a given a pointer only to that node, deleting last node in this case (26) How to read a singly linked list backwards? a: Using recursion