Question Bank
Question Bank
2 Differentiate between linear and non-linear data structures. Give the examples of 5 1 2
both the types.
3 Explain the difference between Linear Search and Binary Search in terms of their 5 1 2
approach and prerequisites.
4 Describe how Merge Sort uses the "divide and conquer" strategy to sort elements. 4 1 2
Provide an appropriate example.
5 Why is Binary Search more efficient than Linear Search for large datasets? 5 1 2
6 Write the algorithmic steps and Elaborate the working of the Selection Sort algorithm 5 1 2
7 Apply the Bubble Sort algorithm to sort the following list: [5, 3, 8, 4, 6]. Show each 4 1 3
step of the process.
8 Use Binary Search to find the element "23" in the sorted list: [4, 8, 15, 16, 23, 42]. 4 1 3
Trace each step of the search.
9 Perform Quick Sort on the array [10, 7, 8, 9, 1, 5] and show the partitioning process 5 1 3
for the first pivot.
10 Analyse the time complexity of Quick Sort with a suitable example. Under what 5 1 4
conditions does Quick Sort perform poorly?
Unit 2
12 What is the principle of operation for a stack (LIFO or FIFO)? Explain briefly. 4 2 1
14 What is the difference between a circular queue and a linear queue? What is the 4 2 3
advantage of circular queue over linear queue
16 Describe the role of a circular queue and how it differs from a simple queue. 5 2 2
17 Convert following expressions from infix to post fix using stack (Any 2) 4 2 2
1. A*(B+C)/D
2. (A+B) * (C-D)
3. A+B/C-D
18 Convert the infix expression manually to postfix and prefix 4 2 2
1. (A + B) * (C - D).
2. (A+B-C)*(D-E)/(F-G+H)
19 Write a pseudocode for push and pop operations for stack implementation using an 5 2 3
array ,Mention error conditions for both the operations in the pseudocode
Unit 3
22 Describe the differences between a singly linked list and a doubly linked list 5 3 2
24 Explain how a singly linked list is traversed with the help of an algorithm. 5 3 2
25 Describe the steps involved in adding two polynomials using a linked list. 4 3 2
26 Explain the advantage of implementing stacks and queues using a linked list instead 5 3 2
of an array.
28 Demonstrate how a queue can be implemented using a linked list with enqueue and 5 3 3
dequeue operations.
29 What do you mean by doubly linked list? Describe its operations to insert and delete 5 3 4
a node at the beginning of the list
Unit 4
31 Define the following tree terminologies with examples: Root, Leaf, Parent, Child, 4 4 1
Degree, Depth, and Height.
32 Explain the differences between strict binary trees, complete binary trees, and full 4 4 2
binary trees with appropriate diagrams.
34 Given a binary tree, trace and explain the preorder, inorder, and postorder traversal 4
sequences for the tree below:
35 Compare Binary Search Trees (BST) and AVL Trees based on their structure, 5 4 4
insertion, deletion, and efficiency.
15
10 25
5 12 30
i) Explain the process of searching for the key "12" in the BST.
ii) What will be the inorder traversal of the BST?
37 Justify why an AVL Tree is more balanced compared to a standard Binary Search 5 4 5
Tree (BST). Support your answer with an example.
38 Construct an AVL Tree by inserting the following elements in sequence: 30, 20, 40, 5 4 6
10, 25, 35, 50. Show rotations if required.
39 Design a Threaded Binary Tree for the inorder sequence: 5, 10, 15, 20, 25, 30, 35. 5 4 6
Draw the tree and explain how threading helps in traversal.
40 Consider a Binary Search Tree (BST) where elements 10, 20, 30, 40, 50 are inserted 4 4 6
sequentially.
i) Draw the BST.
ii) Convert it into an AVL Tree by performing necessary rotations.
Unit 5
41 Define the following graph terminologies with examples: Graph, Vertex, Edge, 4 5 1
Degree, Path, Cycle, Connected Graph, and Weighted Graph.
42 Explain the difference between Adjacency Matrix and Adjacency List with suitable 4 5 2
examples.
43 Construct an Adjacency Matrix and Adjacency List representation for the following 4 5 3
graph:
44 Given the graph below, trace and explain the Breadth-First Search (BFS) traversal 5 5 4
starting from node A.
46 Consider the weighted graph below. Apply Dijkstra’s Algorithm to find the shortest 5 5 5
path from node A to all other nodes.
47 Justify why Prim’s Algorithm and Kruskal’s Algorithm are used for finding the 5 5 5
Minimum Cost Spanning Tree (MST) and discuss which one is more efficient for
dense graphs.
48 Construct a graph with at least 5 vertices and apply Depth First Search (DFS) on it, 5 5 6
showing the step-by-step traversal process.
49 Design an example where Dijkstra’s Algorithm fails when applied to a graph with 5 5 6
negative edge weights and suggest an alternative algorithm.
Unit 6
51 Define the different types of files in computer systems and give examples for each. 4 6 1
52 Explain the various file operations performed in a file system with examples. 4 6 2
53 Consider a student database file. Show how Sequential, Direct, and Indexed file 4 6 3
organizations store data for efficient retrieval.
54 Compare and contrast Sequential, Indexed, and Direct file organization in terms of 5 6 4
efficiency and access speed.
57 Explain the concept of hashing functions and list different types of hashing functions 4 6 2
with examples.
58 Given a set of keys (20, 34, 45, 67, 89, 90) and a hash table size of 10, apply the 4 6 3
Division method of hashing to store the keys in the table.
59 Discuss different collision resolution techniques and analyze their efficiency with 5 6 4
examples.
60 Design a hash table using Chaining and Linear Probing for the following keys (15, 5 6 6
28, 42, 55, 67, 80) using a hash function h(k) = k mod 7.