0% found this document useful (0 votes)
24 views

Data Structures Question Bank

Uploaded by

cexebe6629
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Data Structures Question Bank

Uploaded by

cexebe6629
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Q.

No 6 and 10 Marks
1 Summarize the linked list implementation of queue with neat diagram. 1
2 Analyse Asymptotic Notation with example. 1
3 Explain Big-Oh, Omega, and Theta notations with examples. 1
4 How do you perform insertion and deletion operations in an array? Explain with examples. 1
Derive the Big Oh notation for the following block of code by explaining the steps to arrive at it.
for(i=0;i<n;i++)
5 1
for(j=1; j<n;j/=2)
statement block;
6 Develop the pseudocode to perform insertion in a singly linked list with neat diagrams. 1
Design the algorithms for insertion of a node in a Doubly Linked List at different positions. Represent them using
7 1
diagrams.
Evaluate the following postfix expressions using a stack, explaining each and every step:
8 a.2 3 1 * + 9 - 1
b.100 200 + 2 / 5 * 7 +
Design the algorithms for the following and explain with neat diagrams:
9 (i)Deletion of a node in Singly Linked List 1
(ii)Insertion of a node in Doubly Linked List
Elaborate on the pseudocode for the enqueue and dequeue of elements in a queue which is implemented as a Singly
10 1
Linked List.
What is a linked list? Describe the suitable routine segments for any three operations in a Singly linked list with
11 1
program.
Design algorithms for inserting a node into a Doubly Linked List at various positions (beginning, end, and a specified
12 position). Illustrate each algorithm with appropriate diagrams to represent the state of the list before and after the 1
insertion.
Construct an expression tree for the expression (a + b * c) +((d * e + 1) * g). Give the outputs when you apply preorder,
13 2
inorder and postorder traversals.
Build a min heap and max heap using the following elements and elaborate on the heapify operations involved:
14 2
10,7,11,5,4. Demonstrate the deletemin() operation on the resultant min heap and max heap.
Construct an AVL tree by inserting the following elements:
15 8,9,10,2,1,5,3. 2
Highlight all the rotations involved.
Construct a binary search tree for the following elements:
16 50, 30, 40, 60, 70, 35, 25, 65 2
Explain in detail about the process of constructing a BST.
Perform inorder, preorder and post order traversals of the following binary tree:

17 2

Explore the steps involved in the insertion of the following elements in a binary search tree: 45, 23, 78, 12, 56, 89, 30
18 In the resultant tree delete 12. 2

Construct an AVL tree using the following elements, Describe the insertion process and examine the rotations required
19 to maintain the AVL property at each step. 2
21,26,30,9,4,14,28,18,15,10,2,3,7
Explain the concept of a Max Heap in the context of a Priority Queue with step by step procedure for insertion of every
20 element clearly: 2
5,12,64,1,37,90,91,97
Construct an AVL tree having the following elements, examining the rotations involved:
21 2
8, 9, 10, 2, 1, 5, 3, 6, 4, 7, 11, 12
Create a max heap for the following elements, explaining the step by step procedure for insertion of every element
22 clearly: 2
3,5,9,6,8,20,10,12,18
Perform inorder, preorder and post order traversals of the following binary tree:

23 2

Explore the steps involved in the insertion of the following elements in a binary search tree: 25,3,45,17,26,18,13,20. In
24 2
the resultant tree delete 17.
Formulate the step-by-step process of performing Depth-First Search (DFS)
traversal on a given graph.

25 3

Calculate the shortest path from node each vertex to all other vertex using Dijkstra's algorithm.

26 3

Find the Minimum Spanning Tree (MST) using Kruskal's algorithm.

27 3

Convert the given graph into both adjacency matrix and adjacency list
representations.

28 3

Calculate the shortest path from node each vertex to all other vertex using Dijkstra's algorithm with algorithm.

29 3
Discuss Prim’s algorithm for finding the Minimum Spanning Tree in a graph. For each algorithm, outline the steps
involved in the process, and illustrate the execution with diagrams.

30 3

Perform DFS and BFS on the following graph by explaining the process involved. Start with node 1:

31 3

Explain Kruskal's Algorithm for finding the Minimum Spanning Tree (MST) of a graph. Illustrate the algorithm with a
suitable example, including the steps taken to select edges and the final MST formed.

32 3

Perform DFS and BFS on the following graph by explaining the process involved. Start with node S:

33 3

Sketch the adjacency matrix and adjacency list for the following graph:

34 3

Develop an algorithm to compute the shortest path using Dijkstra’s algorithm. Validate the algorithm with suitable
35 3
example.
36 Illustrate Kruskal’s and Prim’s algorithms for finding the Minimum Spanning Tree with examples. 3
Demonstrate selection sort method on the following elements by explaining every step in the process:
37 4
56,26,93,17,77,31,44,55,20.
Analyse the steps in the sorting of the following elements using insertion sorting technique:
38 4
56,26,93,17,77,31,44,55,20.
Develop Shell sort algorithm to sort a set of ‘N’ numbers and demonstrate the sorting steps for the following set of
39 4
numbers: 30, 52, 29,87,63,27,19,54.
40 Articulate Merge sort algorithm and apply it to sort the following numbers: 8,2,4,7,1,3,9,6,5,10 4
Sort the following numbers using Quicksort technique, by explaining each step:
41 4
18,12,14,17,11,13,19,16,15
Perform selection sort and insertion on the following numbers:
42 78,2,67,19,28,45,16,28 4
And showcase the difference between them.
Search for the element 25 in the following list using binary search and calculate the time complexity for the search.

43 4

Perform Merge sort on the following elements:


44 28,22,24,27,21,23,29,25. 4
Explain the process with algorithm.
Demonstrate selection sort method on the following elements by explaining every step in the process:
45 4
29,72,98,13,81,66,52,51,36
Explain Insertion Sort algorithm and sort the following list of numbers with pseudocode:
46 4
4,3,2,10,12,1,5,6
Develop Shell sort algorithm to sort a set of ‘N’ numbers and demonstrate the sorting steps for the following set of
47 4
numbers: 15, 25,22,45,51,35,56,76,95.
Articulate Merge sort algorithm and apply it to sort the following numbers:
48 4
56,10,23,9,34,26,45,17,29,2
The keys 12, 18, 13, 2, 3, 23, 5 and 15 are inserted into an initially empty hash table of length 10 using hash function
49 5
h(k) = k mod 10 and linear probing. What is the resultant hash table.
50 Explain the purpose of separate chaining used with hash table with examples. 5
Elaborate on extendible hashing highlighting the principle of its working with an example. Mention the advantages and
51 5
disadvantages of the same.
52 Illustrate with examples the open addressing methods of collision resolution techniques in hashing. 5
Compare and contrast the performance of linear probing, quadratic probing, and double hashing in terms of collision
53 5
resolution, clustering, and efficiency. Provide examples to support your analysis.
Implement a disjoint set data structure with union by rank and path compression. Given the set of elements {1, 2, 3, 4, 5,
54 6}, perform union operations on pairs (1, 2), (2, 3), (4, 5), and (3, 4), and show the state of the data structure after each 5
operation.
Given a hash table of size 10, apply the division method to hash the keys {23, 45, 12, 78, 56} using the hash function
55 5
h(k) = k mod 10. Show the resulting hash table.
Insert the following elements into a hash table of size 7 using linear probing: {14, 22, 3, 12, 18}. Use the hash function
56 5
h(k) = k mod 7 and show the steps.
Given a hash table of size 10, apply the division method to hash the keys {34, 27, 49, 82, 61} using the hash function
57 5
h(k)=k mod 10.Show the resulting hash table.
58 Explain the concept of hashing in indexing, including the role of hash functions. 5
59 Explain the basic two techniques for Collision-resolution in Hashing with example. 5
Discuss the concept of open addressing in hash tables, detailing the following methods: linear probing and quadratic
60 5
probing.

Q.No 2 Marks
1 Differentiate Linked List and Array data structures.
2 Draw a node of a DLL and label its parts.
3 State the meaning of terminologies of the trees listed below:Degree, Path
4 Define complete binary tree. How it is different from perfect binary tree?
5 List out four different types of graphs.
6 What is mean by connected components in a graph?
7 Outline external sorting. What is the need for it?
8 List out the pre-requisite to perform Binary search in an array data structure.
9 Why is clustering a problem in linear probing?
10 Examine double hashing for collision resolution.
11 List out the areas in which data structures are applied extensively.
12 Differentiate arrays and linked lists.
13 Create a binary tree with four nodes.
14 What are the rules to be followed to construct a binary search tree?
15 Differentiate cyclic and acyclic graph.
16 What is Graph? Explain matrix and linked list representation of a graph.
17 Which sorting technique is best and illustrate with an example?
18 Identify the advantage of shell sort over insertion sort.
19 What is a hash function, and why is it important in a hashing technique?
20 What is the purpose of a Smart Union algorithm in the Disjoint Set data structure?
21 List some applications of stack data structure.
22 Evaluate the following postfix expression: 3 4 * 2 5 * +
23 Define a forest by providing an example.
24 Interpret height of a tree by giving an example.
25 List the difference between directed and undirected graph by giving a real-life example.
26 Name the data structures used for BFS and DFS.
27 Identify the time complexities of Linear Search and Binary Search when searching for a number in a list of n numbers.
28 Perform insertion sort for the following list of numbers: 5, 1, 3, 2 Write the result of each iteration.
29 Recall Linear Probing with an example.
30 Define Rehashing.

You might also like