Every question in the paper gets a full exam-length answer in the app — organised by marks, the way a topper writes it.
7 marks Long answer
Explain Bubble Sort with an example and analyze its best-case and worst-case time complexity.
Show answer outline
Bubble Sort repeatedly swaps adjacent elements; best-case O(n), worst-case O(n^2).
The full exam-length answer is in the app.
7 marks Long answer
Explain Merge Sort using Divide and Conquer and derive its time complexity.
Show answer outline
Merge Sort divides the array, sorts subarrays, and merges; time complexity is O(n log n).
The full exam-length answer is in the app.
7 marks Long answer
Explain Selection Sort with a suitable example and analyze its time complexity.
Show answer outline
Selection Sort selects the minimum element; time complexity is O(n^2).
The full exam-length answer is in the app.
7 marks Long answer
Solve the recurrence relation of Merge Sort using the recursion tree method.
Show answer outline
The recurrence relation T(n) = 2T(n/2) + O(n) solves to T(n) = O(n log n).
The full exam-length answer is in the app.
4 marks Medium answer
Explain Big-O, Big-Ω and Big-Θ notations with suitable examples.
Show answer outline
Big-O describes upper bounds, Big-Ω lower bounds, and Big-Θ tight bounds of time complexity.
The full exam-length answer is in the app.
4 marks Medium answer
Analyze the time complexity of the following nested loop: for i = 1 to n for j = 1 to n print(i, j)
Show answer outline
The time complexity is O(n^2) due to the nested loops.
The full exam-length answer is in the app.
4 marks Medium answer
Explain the Divide and Conquer strategy. Describe its three basic steps.
Show answer outline
Divide and Conquer involves dividing the problem, conquering subproblems, and combining results.
The full exam-length answer is in the app.
4 marks Medium answer
Explain Binary Search using Divide and Conquer with an example.
Show answer outline
Binary Search divides the sorted array and searches; time complexity is O(log n).
The full exam-length answer is in the app.
1 marks Short answer
Define an algorithm.
Show answer outline
An algorithm is a step-by-step procedure for solving a problem.
The full exam-length answer is in the app.
1 marks Short answer
Explain the characteristics/properties of a good algorithm.
Show answer outline
Good algorithms are characterized by clarity, efficiency, and finiteness.
The full exam-length answer is in the app.