EduRudram
Join Our You Tube channel
Data Structure
2 Marks
i. Define best case, average case and worst case for analyzing the complexity of a
program.
ii. Differentiate between binary search tree and a heap
iii. Write the condition for empty and full circular queue
iv. What do you understand by tail recursion?
v. Construct an expression tree for the following algebraic expression:
a. (a - b) / ((c * d) + e)
vi. Differentiate between internal sorting and external sorting
vii. What are the advantages and disadvantages of array over linked list?
viii. Write an algorithm for Breadth First Search (BFS) traversal of a graph
ix. In a complete binary tree if the number of nodes is 1000000
x. What will be the height of complete binary tree
xi. Which data structure is used to perform recursion and why?
xii. Define a sparse matrix
xiii. Suggest a space efficient representation for space matrices
xiv. List the advantages of doubly linked list over single linked list
xv. Give example of one each stable and unstable sorting techniques
xvi. Write advantages of AVL tree over Binary Search Tree (BST)
xvii. What is tail recursion? Explain with a suitable example
xviii. Write different representations of graphs in the memory
xix. Draw the binary search tree that results from inserting the following numbers in
sequence starting with 11: 11, 47, 81, 9, 61, 10, 12
xx. Convert the infix expression (A+B) *(C-D) $E*F to postfix
xxi. Give the answer without any spaces
xxii. Rank the following typical bounds in increasing order of growth rate:
a. O(log n), O(n4 ), O(1), O(n2 log n)
xxiii. What are the various asymptotic notations?
xxiv. Why are parentheses needed to specify the order of operations in infix expressions
but not in postfix operations?
Download the App Now EduRudram Success Classes
Contact - 06398101339
Like, Share & Subscribe
EduRudram
Join Our You Tube channel
xxv. How the choice of pivot element effects the running time of quick sort algorithm?
xxvi. What are the 2 different forms of hashing?
xxvii. What is the significance of binary tree in Huffman algorithm?
xxviii. What is the number of edges in a regular graph of degree d and n vertices
xxix. Write an algorithm to obtain the connected components of a graph
Unit I
7 Marks
What is asymptotic notation? Explain the various Types in details
What is complexity of an algorithm? Explain various notations used to express the
complexity of an algorithm
What are the various asymptotic notations? Explain Big O notation
Consider the linear arrays AAA [5 : 50], BBB [– 5 : 10] and CCC [1 : 8]
A. Find the number of elements in each array
B. Suppose base (AAA) = 300 and w = 4 words per memory cell for AAA
Find the address of AAA [15], AAA [35] and AAA [55]
Suppose multidimensional arrays P and Q are declared as P(– 2: 2, 2: 22) and Q(1:
8, – 5: 5, – 10 : 5) stored in column major order
i. Find the length of each dimension of P and Q
ii The number of elements in P and Q
iii Assuming base address (Q) = 400, W = 4, find the effective indices E1 , E2 , E3
and address of the element Q[3, 3, 3]
What do you understand by sparse matrix
What are the advantages and disadvantages of single linked list ?
Write a C program create a Singly linkedlist
What is meant by circular linked list ?
What is Doubly linkedlist?
Write difference between array and linked list
Define data structure
Describe about its need and types
Why do we need a data type ?
Download the App Now EduRudram Success Classes
Contact - 06398101339
Like, Share & Subscribe
EduRudram
Join Our You Tube channel
What do you understand by complexity of an algorithm ? Compute the worst case
complexity for the following C code :
main()
{ int s = 0, i, j, n;
for (j = 0; j < (3 * n); j++)
{
for (i = 0; i < n; i++)
{ s = s + i;
}
printf(“%d”, i);
}
}
Unit II
7 Marks
What is Stack ? Discuss PUSH and POP operation in stack and write down their
algorithm
Write a C function for array implementation of stack
Write all primitive operations
Write a C function for linked list implementation of stack
Write all the primitive operations
What do you understand by polish and reverse polish notation?
What is recursion ? Explain
What is recursion ? Write a recursive program to find sum of digits of the given
number
Also, calculate the time complexity
What is Tower of Hanoi problem ? Write the recursive code in C language for the
problem with its algorithm
Write a recursive and non-recursive program to calculate the factorial of the given
number
What is circular queue ? Write a C code to insert an element in circular queue
Write all the condition for overflow
Write an algorithm to insert and delete an item from the circular linked list
What do you mean by priority queue & Dequeue ? Describe its applications
Write down the condition for empty and full circular queue
What do you understand by tail recursion? Calculate total no
of moves in Tower of Hanoi for n=10 disks
Download the App Now EduRudram Success Classes
Contact - 06398101339
Like, Share & Subscribe
EduRudram
Join Our You Tube channel
Write a C program to reverse a string using stack
Consider the following infix expression and convert into reverse polish notation
using stack A + (B * C – (D/E ^ F) * H)
Consider the following arithmetic expression written in infix notation : E = (A + B)
* C + D / (B + A * C) + D E = A/B C + D * E – A * C Convert the above
expression into postfix and prefix notation
Unit III
What is collision ? Discuss collision resolution techniques.
Write a short note on insertion sort. Write algorithm
Write a short note on Selection sort. Write algorithm
Write a short note on Bubble sort. Write algorithm
What is quick sort ? Sort the given values using quick sort; present all
steps/iterations : 38, 81, 22, 48, 13, 69, 93, 14, 45, 58, 79, 72 10
Use quick sort algorithm to sort 15, 22, 30, 10, 15, 64, 1, 3, 9, 2. Is it a stable
sorting algorithm? Justify
Write an algorithm for merge sorting. Using the algorithm sort in ascending order
: 10, 25, 16, 5, 35, 48, 8 12
Write a short note on heap sort. Write a short note on radix sort.
Write a short note on hashing techniques.
What do you mean by hashing and collision? Discuss the advantages and
disadvantages of hashing over other searching techniques.
What do you mean by searching ? Explain.
What is difference between sequential (linear) search and binary search technique
?
What do you mean by hashing ? Discuss types of hash functions.
Unit IV
Write the algorithm for deletion of an element in binary search tree.
What is a threaded binary tree ? Explain the advantages of using a threaded binary
tree.
What is Huffman tree ? Create a Huffman tree with following numbers : 24, 55,
13, 67, 88, 36, 17, 61, 24, 76 10.
Download the App Now EduRudram Success Classes
Contact - 06398101339
Like, Share & Subscribe
EduRudram
Join Our You Tube channel
Explain Huffman algorithm. Construct Huffman tree for MAHARASHTRA with
its optimal code
Define AVL trees. Explain its rotation operations with example. Construct an AVL
tree with the values 10 to 1 numbers into an initially empty tree.
Explain binary search tree and its operations. Make a binary search tree for the
following sequence of numbers, show all steps : 45, 32, 90, 34, 68, 72, 15, 24, 30,
66, 11, 50, 10.
Define binary search tree. Create BST for the following data, show all steps : 20,
10, 25, 5, 15, 22, 30, 3, 14, 13 3.
Write a short note on strictly binary tree, complete binary tree and extended binary
tree
Define tree, binary tree, complete binary tree and full binary tree
Write algorithm or function to obtain traversals of a binary tree in preorder,
postorder and inorder
Construct a binary tree for the following :
Inorder : Q, B, K, C, F, A, G, P, E, D, H, R
Preorder : G, B, Q, A, C, K, F, P, D, E, R, H
Find the postorder of the tree
What is height balanced tree ? Why height balancing of tree is required ? Create an
AVL tree for the following elements : a, z, b, y, c, x, d, w, e, v, f.
Define a B-tree. What are the applications of B-tree ? Draw a B-tree of order 4 by
insertion of the following keys in order : Z, U, A, I, W, L, P, X, C, J, D, M, T, B, Q,
E, H, S, K, N, R, G, Y, F, O, V.
Construct a B-tree on following sequence of inputs 10, 20, 30, 40, 50, 60, 70, 80, 90
Assume that the order of the B-tree is 3
Difference between B+ tree index files and B-tree index files with an example
Unit V
What do you mean by spanning tree and minimum spanning tree ?
Write down Prim’s algorithm to find out minimal spanning tree.
Write Kruskal’s algorithm to find minimum spanning tree.
Explain transitive closure.
Write the Floyd Warshall algorithm to compute the all pair shortest path. Do one
example on this algorithm.
Write and explain Dijkstra’s algorithm for finding shortest path. Do one example
on this algorithm.
What is a graph ? Describe various types of graph. Briefly explain few applications
of graph
Discuss the various types of representation of graph.
Download the App Now EduRudram Success Classes
Contact - 06398101339
Like, Share & Subscribe
EduRudram
Join Our You Tube channel
BEST OF LUCK
TO
ALL STUDENTS
Download the App Now EduRudram Success Classes
Contact - 06398101339
Like, Share & Subscribe