Department of Software Engineering Due Date: 27-04-2021 Time:12:00 PM
Mid Term: Assignment Design and Analysis of Algorithm BCSE: 4th Note: Clearly write down your name and complete registration number on your solved assignment. Q.1
Q 2: Q 3: a) Solve the following recurrence using substitution method.
b) Solve the following recurrence using substitutions and tree method?
T(n)= T(n/3)+T(2n/3) + cn if n>1
T(1)=1 if n=1 Q.4 Apply Heap sort and Quick sot algorithms on your own choice array A of size 8 to sort it in the ascending order and gives it worst case time complexity of both algorithms. Hunts: Example of array (A = < 3, 10, 1, 5, 7, 4, 8, 9 >)