You are on page 1of 2

1. What is data structure? What are the different types of data structures available? 2.

What is time complexity, space complexity? Explain the asymptotic notati ons for complexity of algorithms. 3. What is a linear array? How indexing is done in an array? 4. Why array is called a dense list or a static data structure? 5. Write a program to perform insertion, deletion and searching in an array and show the corresponding addresses also (using pointer as array). Write the c orresponding algorithms also. 6. Write a program to perform matrix multiplication and addition. 7. What is a linked list? Write algorithm to search an element is the list is unsorted and sorted. Write a program to perform insertion at the beginning, i nsertion after a given location, deletion and searching in a linked list. Write the corresponding algorithms also. 8. Why binary search algorithm cannot be applied to linked list or what is the main drawback of using linked list. 9. How garbage collection is done in a linked list. 10. What are the different types of linked list available? (circular linked list, doubly linked list, header linked list) 11. Write a program to perform insertion, deletion and search in a doubly li nked list. 12. Write a program to perform insertion, deletion and search in a circular linked list. 13. What is a stack? Give two real life examples of stack. Give two applicat ions of stacks. 2+4+4 14. Write an algorithm for the evaluation of postfix expression. Evaluate th e following expression and show the stack contents: 5, 6, 2, +, *, 12, 4, /, 15. Write an algorithm to transform infix expression into postfix expressi on. Transform the following infix expression into postfix and show the c ontents of the stack. ( D / E F ) * G ) * H A + ( B * C Translate the following postfix into infix notation 12, 7, 3, -, /, 2, 1, 5, +, *, + Evaluate the following parenthesis free arithmetic expressions: 5 + 3 2 8 / 4 * 3 +6 6 + 2 3 + 9 / 3 4 * 5 16. What is recursion? Mention the advantages and disadvantages of using recursion. Write recursive program and algorithm for the following: a. factorial of a number b. Fibonacci sequence 17. Write notes on the following: a. divide and conquer algorithm b. towers of Hanoi 18. Write a program to perform insertion and deletion in a stack using both array representation and linked representation. Write the corresponding alg orithms. 19. What is a queue? Give two real life examples of queue. 20. Write a program to perform insertion and deletion in a queue using both array representation and linked representation. Write the corresponding algo rithms also. 21. What is the advantage of using linked representation over array represen tation. 22. Write notes on deques and priority queues.

23. What is a binary tree, complete binary tree, extended binary tree or 2 t rees? 24. Write the preorder, postorder and inorder notation of the given tree:

25. Write algorithms for preorder, postorder and inorder traversal. 26. Draw the tree from the following sequences: Inorder: E A C K F H D B G Preorder: F A E K C D H G B 27. Draw the tree T which corresponds to the expression E= (2x + y) (5a b)^3 Find the prefix expression and the preorder of T. 28. Write notes on header nodes or threads. 29. What is a binary search tree? Construct a binary search tree from the follow ing nodes: 40, 60, 50, 33, 55, 11 30. Give an application of binary search tree or write an algorithm to find and delete all the duplicates present in a collection of elements. 31. Delete 44, 75 and 25 from the given binary search tree.

32. What is an AVL tree? Why is it needed? What is balance factor? 33. Construct an AVL search tree by inserting the following nodes: 64, 1, 44, 26, 13, 110, 98, 85 34. Delete 120, 64 and 130 from the following AVL tree. 35. What type of data structure is used to support retrieval and manipulation of data stored in external memory. 36. What is an m-way search tree? What is the goal of m-way search tree? 37. Construct a 3-way search tree from the following nodes: D, K, P, V, A, G Delete A and K in the above tree. 38. What is a B tree? Why is it needed? Explain with example the searching, inse rtion and deletion in a B-tree. 40. What is heap or maxheap and minheap? Draw a heap from the following sequential representation: 97,88,95,66,55,95,4 8,66,35,48,55,62,77,25,38,18,40,30,26,24 41. Build a heap from the following list of numbers: 44, 30, 50, 22, 60, 55, 77, 55 42. Suppose n data items A1, A2, ,An are already sorted. a. Assuming the items are inserted in order into an empty binary search tr ee, describe the final tree. b.What is the depth D of the tree? c. Compare D with the average depth AD of a binary search tree with n node s for (1) n=50 (2) n=100 (3) n=500 43. What is hashing? What is hash function? Discuss the popular hash functions. 44. What is collision resolution? Discuss the collision resolution techniques.

You might also like