Unit 2 QB
Unit 2 QB
RAMAPURAM, CHENNAI – 89
PART A
PART B
1. Solve the following recurrence relations using the Master Theorem and justify your
answers:
(a) T(n) = 2T(n/2) + O(n)
(b) T(n) = 4T(n/2) + O(n²)
(c) T(n) = 3T(n/2) + O(n log n)
2. Sort “MERGESORT” using merge sort and derive its time analysis using Master’s theorem.
3. Sort “YEAR” using quick sort and derive its time analysis using Master’s theorem.
4. In the Array: [2, 5, 8, 12, 16, 23, 38, 45, 56, 72] find “50” using Binary search. Also give its
time analysis.
5. Perform Strassens matrix multiplication for two 3X3 matrix.
6. Find the maximum sum of a contiguous subarray for a given array that contains both positive
and negative integers arr = {-2, -3, 4, -1, -2, 1, 5, -3}
7. Explain the Divide and Conquer approach for solving computational geometry problems such as
Convex Hull and Closest Pair of Points. Discuss the advantages and time complexity of this approach
8. Find maximum and minimum in an array [7,2,9,1,5,3,8,6] using divide and conquer