HOLYCROSS ENGINEERING COLLEGE
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
QUESTION BANK
III SEMESTER
CS3301-DATA STRUCTURES
Regulation – 2021
UNIT I - LINEAR DATA STRUCTURES – LIST
Abstract Data Types (ADTs) – List ADT – array-based implementation – linked list implementation
– singly linked lists- circularly linked lists- doubly-linked lists – applications of lists –Polynomial
Manipulation – All operation (Insertion, Deletion, Merge, Traversal)
PART – A
Questions BT Competence
Q.No
Level
1 Define ADT. Give any two examples. BTL-1 Remember
2 Distinguish between linear and non linear data BTL-2 Understand
structures.
3 Compare calloc() and realloc() function and mention BTL-4 Analyze
its application in linkedlist.
4 Describe the differences between singly and doubly BTL-1 Remember
linked lists.
5 List out the areas in which data structures are applied BTL-1 Remember
extensively.
6 Define non linear data structure. BTL-1 Remember
7 Compare singly linked list with circular linked list. BTL-5 Evaluate
8 What are the types of linked list? BTL-1 Remember
9 List out the advantage of circular linked list. BTL-1 Remember
10 Binary search cannot be performed on a linked list. BTL-3 Apply
Examine.
11 Discuss the advantages and disadvantages of linked BTL-2 Understand
lists and arrays.
12 Give an example for linked list application. BTL-2 Understand
13 Specify the use of Header node in a linked list. BTL-6 Create
14 Illustrate the use of linked list with an example. BTL-3 Apply
15 Show the ways in which list ADT can be implemented. BTL-3 Apply
16 Differentiate arrays and linked lists. BTL-2 Understand
17 Analyze and write a find routine in array BTL-4 Analyze
implementation.
18 Analyze and write the array representation of a BTL-4 Analyze
polynomial:p(x) = 4x3+6x2+7x+9
Should arrays or linked lists be used for the following
types of applications?Support your justification.
19 BTL-5 Evaluate
1. Many search operations in sorted list.
Many search operations in Unsorted list.
20 Develop an algorithm for insertion operation in a BTL-6 Create
singly linked list.
PART-B
Describe the following:
1 i. Applications of lists. (5) BTL-1 Remember
Polynomial manipulation. (8)
2 i. What is a linked list? (2) BTL-1 Remember
Describe the suitable routine segments for any four
operations. (11)
List an algorithm to perform the following operations
3 in a doubly linked list.i.Insert a node at the end of the BTL-1 Remember
list.(6)
ii.Delete the last node in the list. (7)
i. Discuss the insertion and deletion
procedures for cursor based linkedlists.(7) BTL-2 Understand
4
Give an algorithm for the deletion and reverse
operations on doubly linkedlist. (6)
5 i. Give the algorithm to perform insertion on a doubly
BTL-2 Understand
linked list.(7)
Give the algorithm to perform deletion on a doubly
linked list.(6)
Write an algorithm to demonstrate a polynomial
6 using a linked list fori.Addition and Subtraction. (7) BTL-3 Analyze
ii.Multiplication operations. (6)
Analyze and write algorithm for Circular Linked list
7 for the followingoperations using structure pointer.
BTL-4 Analyze
i. Create & Insert . (6)
Delete & Display.(7)
Explain the application of linked list in detail.
8 i. Radix sort. (7) BTL-4 Apply
Multi list. (6)
Consider an array A[1: n] Given a position, write an
algorithm to insert an element in the Array. If the
9 position is empty, the element is inserted easily. Ifthe BTL-5 Evaluate
position is already occupied the element should be
inserted with the minimum number of shifts. (Note:
The elements can shift to the left or to the right to
make the minimum number of moves). (13)
10 Develop a program to add the values of the nodes of a
BTL-6 Create
linked list and thencalculate the mean. (13)
11 Describe the various operations of the list ADT with BTL-1 Remember
examples. (13)
12 Illustrate how polynomial manipulations are
performed using lists? Explainany two operations BTL-3 Analyze
with example. (13)
Explain the steps involved in the following
insertion operations in a singlylinked list. BTL-4 Apply
13
i.Insert the node in the start and End. (7) ii.Insert the
node in the middle of the List (6)
14 Dicuss an algorithm for linked list implementation of BTL-2 Understand
list. (13)
PART-C
1 Create an algorithm to add two polynomials using BTL-6 Create
linked list.(15)
2 Explain an algorithm to split a linked list into two sub BTL-5 Evaluate
lists containing odd andeven ordered elements in
them respectively.(15)
3 Explain an algorithm to merge two sorted linked BTL-5 Evaluate
lists into a single sortedlist.(15)
Design algorithm for various operations performed on
4 circular linked list. BTL-6 Create
Extend the algorithm defined in the previous
question for the doubly linkedcircular list. (15)
UNIT II - LINEAR DATA STRUCTURES – STACKS, QUEUES
Stack ADT – Evaluating arithmetic expressions- other applications- Queue ADT – circular
queueimplementation – Double ended Queues – applications of queues
PART – A
Questions BT Competence
Q.No
Level
1 Point out the advantage of representing stack using a BTL-4 Analyze
linked list than array.
2 Point out the rules followed during the infix to BTL-4 Analyze
postfix conversions.
3 Compare the working of stack and queue data BTL-5 Evaluate
structure.
4 Develop an algorithm for inserting a new element BTL-6 Create
into the stack.
5 Define stack and queue. BTL-1 Remember
6 List any four applications of stack. BTL-1 Remember
7 Given the prefix for an expression. Write its postfix: BTL-2 Understand
8 Describe how the following "infix" expression is BTL-2 Understand
evaluated with the help of
9 Give the postfix and prefix forms of the expression: BTL-2 Understand
10 Define double ended queue. BTL-1 Remember
11 List the applications of a queue. BTL-1 Remember
12 What are the applications of priority queue? BTL-1 Remember
13 What is circular queue? BTL-1 Remember
14 Circular queue is better than standard linear queue, BTL-2 Understand
Why?
15 Classify the different types of queues. BTL-3 Apply
16 Illustrate the difference between a queues and linked BTL-3 Apply
lists with an example.
17 Complete a routine to display the contents of queue. BTL-3 Apply
18 Analyze and write a routine to check whether the BTL-4 Analyze
queue is full or empty.
19 For railway reservation the queue data structure is BTL-5 Evaluate
preferred –Justify.
20 Develop an algorithm for deleting an element in a BTL-6 Create
double ended queue.
PART-B
1 Describe with an example how to evaluate arithmetic BTL-1 Remember
expressions usingstacks. (13)
2 Explain array based implementation of stacks. (7)
Explain linked list implementation of stacks. (6) BTL-4 Apply
3 i. Describe about stack ADT in detail. (7) BTL-1 Remember
Explain any one application of stack.(6)
Explain the following
4 expressions with an example. BTL-4 Apply
i.Prefix and infix .(7)
ii.Postfix. (6)
i. Write an algorithm to convert an infix expression
5 to a postfix expression. Trace the algorithm to convert
BTL-5 Evaluate
the infix expression ‘(a+b)*c/d+e/f” to a postfix
expression.(8)
Justify the need for Infix and Postfix expression. (5)
i. Give an algorithm for push and pop
operations on stack using a linkedlist.(7)
6 BTL-2 Understand
Discuss about addition and deletion operations
performed on a circularqueue with necessary
algorithms. (6)
i. Describe the process of postfix expression
7 evaluation with an example. (7) BTL-2 Understand
Describe the process of conversion from infix
expression to postfixexpression using stack. (6)
i. Write an algorithm that checks if expression is
8 correctly parenthesized usingstack and illustrate BTL-3 Analyze
with an example. (7)
Write the function to examine whether the stack is
full() or empty(). (6)
9 i. Describe about queue ADT in detail. (7) BTL-1 Remember
Explain any one application of queue with suitable
example. (6)
10 Briefly describe the operations of queue with BTL-1 Remember
examples. (13)
11 Analyze and write an algorithm to implement queue BTL-4 Analyze
functions using arrays.
(13)
12 Develop an algorithm to perform the four operations BTL-6 Create
in a double ended queue
that is implemented as an array. (13)
13 Discuss circular queue and its implementation. (13) BTL-2 Understand
14 Illustrate the enqueue and dequeue operations on BTL-3 Analyze
double ended queues. (13)
PART-C
1 Develop and Show the simulation using stack for the BTL-6 Create
following expression :12 + 3 * 14 – (5 * 16) + 7 .(15)
2 Explain an algorithm to implement the circular queue BTL-5 Evaluate
using arrays.
List the applications of Queues.(15)
Assess the difference between double ended queue
3 and circular queue. BTL-5 Evaluate
Show the simulation using stack for the following
expression to convert infixto postpix : p * q = (r-s /
t).(15)
4 Develop an algorithm to explain Priority Queue,
BTL-6 Create
deQueue and the applicationsof queues. (15)
UNIT III -NON LINEAR DATA STRUCTURES-TREES
Tree ADT – tree traversals - Binary Tree ADT – expression trees – applications of trees –
binary search treeADT –Threaded Binary Trees- AVL Trees – B-Tree - B+ Tree - Heap –
Applications of heap.
PART-A
Q.No Questions BT Competence
Level
1 If the depth of the binary tree is k, the maximum BTL 5 Evaluate
number of nodes in thebinary tree is 2k-1.Justify
2 For the given binary search tree, if we remove the root
and replace it with something from left subtree. What
will be the value of the new root? Justify your
answer.
14
BTL 5 Evaluate
2 22
1 5 20 30
4 17 40
3 Define a fully binary tree.Give an example. BTL 1 Remember
4 Create an expression tree for the BTL 6 Create
expression.a*(b+c)+((d+e*f)*g)
5 How does the AVL tree differ from binary search tree? BTL 4 Analyze
6 What are the various rotations in AVL trees? BTL 1 Understand
7 List the applications of trees. BTL 1 Remember
8 What are threaded binary trees? Give its advantages BTL 2 Understand
9 Define balance factor of AVL Tree. BTL 1 Remember
10 How do we calculate the balance factor for each node BTL 2 Understand
in a AVL tree?
11 Simulate the result of inserting 3,1,4,6,2,8,9 into an BTL 6 Create
initially empty AVLTree.
12 Give an example for expression tree. BTL 2 Understand
13 Number the following
binary tree to traverse it
ini.Preorder
ii.Inorder
BTL 2 Understand
14 Explain why binary search cannot be performed on a BTL 4 Analyze
linked list.
15 How do you calculate the depth of a B-Tree? BTL 3 Apply
16 List out the various operations that can be performed BTL 1 Remember
on B-trees
17 List out the properties of B+ -Trees BTL 1 Remember
18 Illustrate the steps in the construction of a heap of BTL 3 Apply
records with thefollowing key
values:12,33,67,8,7,80,5,23
19 Analyze the properties of binary heap. BTL 4 Analyze
20 Define a heap and show how it can be used to BTL 3 Apply
represent a priority queue.
PART-B
1 Write an algorithm for preorder, inorder and BTL 1 Remember
postorder traversal of a binarytree. (13)
Explain the following operations on a binary search
tree with suitablealgorithms BTL 4 Analyze
2
i. Find a node (6)
Find the minimum and maximum elements of binary
search tree (7)
3 i. Write short notes on threaded binary tree (7) BTL 1 Remember
Describe an iterative algorithm to traverse a tree in
preorder (6)
4. Write an algorithm for inserting and deleting a node BTL 1 Remember
in a binary search tree.(13)
5 Discuss in detail the various methods in which a BTL 2 Understand
binary tree can be represented. Discuss the advantage
and disadvantage of each method (13)
6 i. Explain the B+ tree and its properties with an BTL 5 Evaluate
Example (7)
What are the steps to convert general tree to binary
tree? (6)
i. Construct B Tree to insert the following key
7 elements(order of the tree is3) BTL 6 Create
5,2,13,3,45,72,4,6,9,22 (7)
Draw a B Tree of order 6 (6)
i. Discuss how to insert an element in a AVL tree,
8 Explain with algorithm. (7) BTL 2 Understand
Explain how deletion can take place in AVL trees with
suitable algorithms(6)
i. What are AVL trees? Describe the different
rotations defined for AVL tree.(7) BTL 1 Remember
9
ii. Insert the following elements step by step in
sequence into an empty AVL
tree 15,18,20,21,28,2330,26 (6)
10 i. Point out the operations of B-tree using 2-3 tree. (7)
Analyze
ii.Explain the operations of threaded binary tree. BTL 4
(6)
11 Discuss the different traversal technique in binary BTL 2 Remember
tree with suitablealgorithms and examples? (13)
12 Explain the construction of expression tree with BTL 4 Analyze
example. (7)Give the applications of trees (6)
i. Show the result of inserting
15,17,6,19,11,10,13,20,8,14,12 one at a timeinto an BTL 3 Apply
13
initially empty binary min heap.(7)
Show the result of performing three delete min
operations in the final binarymin heap obtained . (6)
i. Illustrate How delete operation performed on
14 binary heap? (7) BTL 3 Apply
Write a suitable operations for procolate up and
percolate down operationsin a binary heap.(6)
PART-C
1 i. Compare B trees with B+ trees.
(7) BTL 6 Create
ii. Create a B+ tree of order 5 for the following data
arriving in sequence:
90, 27, 7, 9, 18, 21, 3, 4, 16, 11, 21, 72 (8)
i. Draw B – Tree pf order m = 5 for the keys
{K, O,S,V,MF,B,G,T,U,W} (5)
2 ii. Delete the keys K and G in order. (5)
Justify the number of splits needed for inserts / delete BTL 5 Evaluate
with properreasons. (5)
UNIT IV -NON LINEAR DATA STRUCTURES –GRAPHS
Definition – Representation of Graph – Types of graph - Breadth-first traversal - Depth-
first traversal –Topological Sort – Bi-connectivity – Cut vertex – Euler circuits –
Applications of graphs.
PART-A
Q.No Questions BT Competence
Level
1 What is a graph and its types? BTL 1 Remember
2 Consider the graph given below. Create the adjacency BTL 6 Create
matrix of it
3 Find out the in-degree and out-degree of each node in
the given graph
BTL 3 Apply
4 Create a complete undirected graph having five BTL 6 Create
nodes
5 Given the following adjacency matrix, draw the
weighted graph.
BTL 2 Understand
6 When do you say a graph is bi-connected? BTL 1 Remember
7 Give the purpose of Dijikstra’s algorithm. BTL 2 Understand
8 Differentiate cyclic and acyclic graph BTL 4 Analyze
9 Classify strongly connected and weakly connected BTL 3 Apply
graph.
10 How to find all articulation points in a given graph? BTL 3 Apply
11 Define the length of the graph. BTL 1 Remember
12 Define minimum spanning tree. Give an example BTL 2 Understand
13 State the principle of Topological sorting. BTL 1 Remember
14 Explain procedure for Depth first search algorithm. BTL 4 Analyze
15 Analyze Bi-connectivity. BTL 4 Analyze
16 Prove that the number of edges in a complete graph BTL 5 Evaluate
of n vertices inn(n-1)/2
17 In a complete graph with n vertices, show that the BTL 5 Evaluate
number of spanningtrees is at least 2 n-1 _ 1
18 What are Euler circuits? BTL 1 Remember
19 Give two applications of graphs. BTL 2 Understand
20 What is residual graph? BTL 1 Remember
PART-B
1 Describe in detail about the following representations BTL 1 Remember
of a graph.
i. Adjacency Matrix (7)
ii. Adjacency List (6)
2 i. Explain the topological sorting of a graph G with BTL 1 Remember
example.
(7)
Quote the step wise procedure for topological sort
(6)
3 Differentiate depth-first search and breadth-first BTL 4 Analyze
search traversal of a graphwith suitable examples. (13)
4 i. Explain with algorithm, How DFS be
performed on a undirectedgraph. (7)
ii. Show the algorithm for finding connected BTL 4 Analyze
components of an undirected
graph using DFS, and derive the time complexity
of the algorithm.(6)
5 i. Discuss an algorithm for Breadth first Search on a BTL 2 Understand
graph.(7)
Give an example based on the algorithm.(6)
6 Compare any two applications of Graph with your BTL 5 Remember
own example (13)
7 Describe any one of the shortest path algorithms BTL 1 Remember
with suitable example
(13)
8 Discuss the prims algorithm for minmum spanning BTL 2 Understand
tree.Give an example.(13)
9 Develop an algorithm to compute the shortest path BTL 6 Create
using Dijkstra’salgorithm. Validate the algorithm with
suitable example. (13)
10 Explain the depth first approach of finding articulation BTL 4 Analyze
points in a connectedgraph with necessary
algorithm.(13)
11 i. Write short notes on Bi-connectivity. (7) BTL 2 Understand
Express different types of graphs with example. (6)
PART-C
1 Given the adjacency matrix of a graph, write a BTL 4 Analyze
program to calculate the in-degree and the out-
degree of a node N in the graph. (15)
2 i. How can we efficiently check whether or not a
graph is disconnected? (7) BTL 5 Evaluate
Describe an algorithm that uses a brute force
approach to find all thearticulation points in G in
O(V (V + E)) time. (8)
3 i. Given a rooted tree, one desires to find the
shortest path from the root to a given node v.
Which algorithm would one use to find this BTL 6 Create
shortest path.(7)
Write a program to determine whether there is at
least one path fromthe source to the destination. (8)
UNIT V - SORTING, SEARCHING AND HASH
TECHNIQUES
Sorting algorithms: Insertion sort - Selection sort - Shell sort - Bubble sort - Quick sort - Merge
sort - Radix sort
– Searching: Linear search –Binary Search Hashing: Hash Functions – Separate Chaining – Open
Addressing –Rehashing – Extendible Hashing
PART – A
Q.N Questions BT Competence
o Level
1 What is hashing? BTL-1 Remember
2 Define extendible hashing. BTL-1 Remember
3 Give the fastest searching algorithm. BTL-2 Understand
4 What is meant by internal and external sorting? Give BTL-1 Remember
any two examples for
each type.
5 Describe the complexity of bubble sort. BTL-1 Remember
6 Name the applications of linear and binary search BTL-1 Remember
techniques.
7 Give the time complexities of bubble sort and quick BTL-2 Understand
sort.
8 Predict the fastest sorting algorithm, justify. BTL-2 Understand
9 Compare internal and external sorting. BTL-4 Analyze
10 Distinguish between linear and binary search BTL-2 Understand
technique.
11 Classify the different sorting methods. BTL-3 Apply
12 Develop an algorithm for a quick sort. BTL-6 Create
13 Which hashing technique is best and illustrate with an BTL-3 Apply
example?
14 Summarize the open addressing hashing method with BTL-5 Evaluate
an example.
15 Point out the advantages of using quick sort. BTL-4 Analyze
16 Compare the working of linear and binary search BTL-4 Analyze
techniques.
17 Select the best sorting method out of the following -
BTL-5 Evaluate
insertion sort, quick sortand merge sort and give
justification.
18 Illustrate the time complexity of insertion sort with an BTL-3 Apply
example.
19 Identify the advantage of shell sort over insertion sort. BTL-1 Remember
20 Develop a simple algorithm for a linear search. BTL-6 Create
PART-B
1 Describe how the divide and conquer technique is BTL-1 Remember
implemented in binarysearch. (13)
Describe the algorithm to sort the following array:
2 77, 33, 44, 11, 88, 22, 66,
55 BTL-1 Remember
i. Insertion sort (7)
Shell Sort (6)
3 i. List the different types of hashing techniques? (7) BTL-1 Remember
Explain them in detail with an Example. (6)
i. Interpret the result of inserting the keys 2, 3, 5,
BTL-2 Understand
4 7, 11, 13, 15, 6, 4 into aninitially empty extendible
hashing data structure with M = 3. (7)
Discuss the running time of Divide-and-Conquer
Merge sort algorithm. (6)
5 i. Sort the sequence 3, 1, 4, 1, 5, 9, 2, 6, 5 using BTL-2 Understand
Insertion sort.
(7)
Describe the routine for insertion sort. (6)
Write an algorithm to sort a set of ‘N’ numbers using
6 quick sort. Demonstratethe algorithm for the BTL-3 Analyze
following set of numbers:
88,11,22,44,66,99,32,67,54,10. (13)
7 Explain the various collision resolution techniques in BTL-4 Analyze
detail with an example.(13)
Compare the below different Sorting methods and
8 discuss about each methodin a very detailed Manner.
BTL-4 Apply
i. Bucket Sort. (7)
Selection Sort .(6)
i. Sort the given integers and Explain the
9 intermediate results using shell sort: BTL-5 Evaluate
35,12,14,9,15,45,32,95,40,5. (7)
Write and Explain a C code to sort an integer array.
(6)
10 i. Create a algorithm to perform a binary Search. (7) BTL-6 Create
Develop an algorithm for Merge sort with an
example.(6)
i. Write short notes on Bubble Sort.(5)
11 BTL-3 Analyze
Illustrate an algorithm to sort the elements using
bubble sort. (8)
Describe the following collision resolution
12 techniques in detail with anexample.
BTL-1 Remember
i. Separate chaining. (7)
Rehashing. (6)
i. Explain different hashing technique. (5)
13 BTL-4 Apply
Explain the rehashing technique with suitable
example. (8)
14 Describe the open addressing and chaining methods BTL-2 Understand
of collusion resolutiontechniques in hashing. (13)
PART-C
1 Develop an algorithm to search a number in a given
set of numbers usingbinary search. Develop and BTL-6 Create
algorithm to explain Extendible Hashing.(15)
2 Explain a C code to sort an integer array using BTL-5 Evaluate
Selection Sort and RadixSort.(15)
3 Explain an algorithm for Shell Sort and Merge Sort BTL-5 Evaluate
and explain withexample.(15)
4 Prepare a quick sort algorithm and explain with
BTL-6 Create
suitable example Give itsworst case, average case
and best case time complexities.(15)