Important Question
Important Question
Unit 1
Q 2 (a) Write the pseudocode to implement insertion, deletion, and search operations in a singly
linked list.?(7 marks)
(b) Explain the differences between the array and linked representations of a linear list. Discuss their
advantages and disadvantages ?.(7 marks)
OR
Q3 Explain the concept of time complexity and space complexity in detail. Provide examples to
illustrate how to calculate the time and space complexities of an algorithm. Discuss the significance of
understanding these complexities in algorithm design.?(14 Marks)
Unit 2
Q4 (A) Define Stack and Queue Abstract Data Types (ADTs). Explain the basic operations performed
on them.? (7 marks)
(B) Implement a Max Heap using an array. Write the code for the following operations: Insert, Delete
Max .?(7 marks)
OR
Q5 Define the Stack Abstract Data Type (ADT). Describe its main operations (push, pop, peek) and
provide an example for each operation. Discuss the differences between array-based and linked list-
based implementations of a stack.?
Unit 3
Q 6 (A)What is hashing? Explain the concept of hash functions and their role in hashing. Describe
the properties of a good hash function.
(B) Describe the bubble sort algorithm. Explain how it works, including the best and worst-case time
complexities. Provide an example to demonstrate the bubble sort process on a small array.
OR
Q 7 Discuss the different types of binary tree traversals (inorder, preorder, postorder). Provide
algorithms for both recursive and non-recursive implementations of these traversals, along with an
example to demonstrate each traversal method.?
Unit 4
Q 8 (A) Describe B-trees in detail. Explain their structure and properties. Discuss the algorithm for
insertion of nodes in a B-tree with a simple example.?
(B) Describe B-trees in detail. Explain their structure and properties. Discuss the algorithm for
insertion of nodes in a B-tree with a simple example.
OR
Q9 Provide a comprehensive explanation of graph terminology, including vertices, edges, and types of
graphs (directed, undirected, weighted, unweighted). Discuss the Graph Abstract Data Type (ADT)
and its operations.
Extra:---- Explain the two primary graph traversal methods: Depth-First Search (DFS) and Breadth-
First Search (BFS). Provide algorithms for both methods, along with examples to illustrate how they
traverse a graph.