Browse papers
A

Section A: Long Answer Questions

Attempt any TWO questions.

3 questions·10 marks each
1long10 marks

What is a graph? Explain Breadth First Search (BFS) and Depth First Search (DFS) traversal techniques with suitable examples and their applications.

graphstraversal
2long10 marks

Define stack and its operations. Write an algorithm to convert an infix expression into postfix and evaluate the postfix expression A B + C * D - with a stack.

stackexpression
3long10 marks

Explain merge sort with its algorithm. Sort the list 38, 27, 43, 3, 9, 82, 10 using merge sort showing all the intermediate steps and analyze its complexity.

sortingmerge
B

Section B: Short Answer Questions

Attempt any EIGHT questions.

9 questions·5 marks each
4short5 marks

What is recursion? Write a recursive algorithm to compute the factorial of a number and explain the role of the stack in recursion.

recursion
5short5 marks

Differentiate between bubble sort and selection sort with examples.

sorting
6short5 marks

Explain inorder, preorder and postorder tree traversals with an example binary tree.

treestraversal
7short5 marks

Compare linear search and binary search. Write an algorithm for binary search and analyze its complexity.

searching
8short5 marks

What is a heap? Explain the heapify operation and construct a max-heap from 4, 10, 3, 5, 1.

heap
9short5 marks

Explain different representations of a graph (adjacency matrix and adjacency list) with examples.

graphs
10short5 marks

What is dynamic programming? Explain it with the example of the 0/1 knapsack problem.

dynamic-programming
11short5 marks

What are the applications of stack? Explain how a stack is used in function calls.

stack
12short5 marks

Explain heap sort algorithm with an example and analyze its time complexity.

sortingheap