Complete Data Structure Important Questions
Complete Data Structure Important Questions
Unit - 1
1. What does abstract data type means? Briefly explain linear and non linear data
structures.
2. What is data structure? Explain different types of data structures with applications.
3. Derive the formula to calculate address A[i, j] of 2-D array, for a Row-major order storage
representation. A 2-D array defined as A[r, c] where 1 ≤ r ≤ 4, 5 ≤ c ≤ 8, requires 2 bytes of
memory for each element. If the array is stored in Row-major order form, calculate the
address of A[3,7] given the Base address as 2000.
4. Define data structure. List out types of Data Structure and explain them in
brief./Differentiate the following terms:
a. Primitive and Non Primitive Data structure
b. Linear and Non Linear Data structure
6. Discuss best case, average case and worst case time analysis with example.
8. A two dimensional array is stored by row, then what is the address of matrix element
A[i,j] for row and column matrix? How array representation of polynomial 2x2+5xy+y2 can
be done?
9. Which data structure is used in a time sharing single central processing unit and one main
memory computer system where many users share the system simultaneously? How users
are added for use of the system?
Unit - 2
1. Explain PUSH and POP operation of the stack with algorithm.
2. Write an algorithm to convert infix to postfix expression and explain it with example.
5. Explain following:
(i) DQUEUE (ii) Priority Queue (iii) Circular Queue
6. Define recursion. What care should be taken in writing recursive function? Give a
recursive solution for the problem of “Towers of Hanoi”.
7. What is recursion? Write a C program for GCD using recursion / Write a C Program for
Factorial Number Using Recursion.
9. Differentiate between stack & queue. Also explain priority queue with example.
11. What is prefix notation? Convert the following infix expression into prefix. A + B – C * D *
ESFSG
12. Write an algorithm to perform various operations (insert, delete and display) for simple
queue.
13. Write algorithms between insert and delete in circular queue. Write an algorithm for
insert and delete operations for circular queue.
Unit - 3
1. Create a Binary Search Tree for the following data and do In-order, Preorder and Post-
order traversal of the tree. 40, 60, 15, 4, 30, 70, 65, 10, 95, 25, 34
3. How graph can be represented? Write an algorithm for Breadth First Search Traversal of
a Graph.
4. What is an AVL tree? Explain the different types of rotations used to create an AVL tree
with suitable examples.
6. Write an algorithm for binary search method and discuss its efficiency
7. Define height of the binary tree. Define height balanced tree with its advantages.
Construct a height balanced binary tree (AVL tree) for the following data.
42,06,54,62,88,50,22,32,12,33
8. Explain Depth First Search and Breadth First Search in graphs with an example.
9. Explain and differentiate BFS and DFS graph traversal method with suitable graph
10. Draw a binary expression tree for the following and perform preorder traversal for the
same: (A + B $ C) + (D + E * F)
11. Construct a binary search tree for the following and perform inorder and postorder
traversals: 5 9 4 8 2 1 3 7 6
12. Write ‘C’ functions for: inserting a node, postorder traversal and counting total number
of nodes for binary search tree.
14. Write Kruskal’s algorithm for minimum spanning tree with an example.
Unit - 4
1. What is hashing? Explain hashing functions.
3. Define hashing. Classify hashing. Explain clustering, secondary clustering, rehashing and
double hashing.
6. Discuss importance of hashing. Also discuss one of the method of hashing with an
example.
Unit - 5
1. Write an algorithm for Binary search method.
3. Sort the following numbers using (i) Selection sort (ii) Quick sort: 10 50 0 20 30 10