You are on page 1of 2

1.

Write the algorithm to perform the insertion operation on a circular queue represented
in the form of an array.
2. Write a recursive function to calculate factorial of a number.
3. Write an algorithm to reverse all elements of a singly linked list.

4. What is the need for AVL trees?


5. Construct an AVL Tree by inserting numbers from 1 to 8.
6. Write the recursive function for the Tower of Hanoi problem. Also draw the
recursion tree for any set of initial values.
7. Explain the advantages of binary search over linear search.

8. Write short notes on:


a) Tail recursion
b) B-Tree
c) Radix sort
e) BFS vs DFS
f)Recursion
g)Binary Search Tree
h)AVL tree
i)Heap
j)ADT
k) Time analysis of algorithms – order notations
l) PUSH and POP algorithm of Stack
m)Tower of Hanoi

9. Convert the following infix expression to postfix notation by showing the operator stack and
output string after reading each input token:
A+B*C-D/E*H
10. What do you mean by hashing? What is hash function? What is collision? How it is handled?
11. What is a priority queue?
12. Write the algorithm of Merge Sort and explain with an example.
13.Explain with a suitable example, the principal operation of Quick Sort.
14.Find the complexity of Quick Sort.
15. Why is the Queue Data Structure called FIFO?
16. In a two dimensional array 10X9 with each element occupying 4 bytes of memory with the
address of the first element [1, 1] is 1000.Find the address of [6, 8] for both Row-major and
Column-major cases.
17. How can a polynomial such as 10a5-3a3+6a2+9 be represented by a linked list?
18. Write down the overflow condition of circular queue.
19. Give an algorithm to search an element in an array using binary search.
20. If n0 be the total number of leaf nodes and n2 be the total number of nodes having two
children in a binary tree, then prove that n2 = n0 - 1.
21. Write an algorithm to insert an item in the beginning of a liked list.
22. Give an algorithm to search an element in an array using binary search.
23. The pre-order and in-order traversal sequence of nodes in a binary tree are given below:
Preorder :ABDGHEICFJK

Inorder :GDHBEIACJFK

Draw a binary tree. Briefly state the logic to construct the tree.

24.Explain with a suitable example .the principal operation of Quick sort.


25.Find out the average case time complexity of Quick sort.
26. Convert the following infix expression into its equivalent postfix expression
using stack. A+B*C/(D+E)
27.Write down an algorithm (or function) to insert an item into a simple queue.
28.Construct the following queue of characters where queue is a circular array which is allocated seven
memory cells.
FRONT=2; REAR =4; QUEUE: _ _ ABC_ _ _

Describe the queue as following operations take place sequentially

i) E is added to the queue


ii) Three letters are deleted from the queue
iii) G,H,I are added to the queue
iv) Two letters are deleted from the queue
v) X is added to the queue
29. Construct an AVL search tree with the following elements in the order of their occurrence:
G, B, A, K, M, C

30.What is complete binary tree? What is threaded binary tree?


31. What is the advantage of circular queue over simple queue? What is output restricted de-queue?
32.Prove that the maximum number of nodes in a binary tree on level i is 2i.

You might also like