You are on page 1of 1

[Approved by AICTE, Govt. of India & Affiliated to Dr.

APJ Abdul
GL BAJAJ
Institute of Technologies & Management
Kalam Technical University, Lucknow, U.P., India]
Department of Applied Computational Science & Engineering
Greater Noida

Assignment-1
1.) What is Asymptotic notation? Explain different types of Asymptotic notation?
2.) Explain Searching technique using Divide and Conquer approach.
3.) Solve the following recurrence relation:
a. T(n) = 3T(n/2+ 47) + 2n^2 + 10*n – ½
b. T(n) = 3T(n-1) + n^4
c. T(n) = 4T(n/3) + n^2
d. T(n) = T(n/4) + T(n/2) + c n^2
4.) Calculate the Time Complexity of the Following code.
a.) for(var i=0;i<n;i++)
i*=k
b.) void function(int n)
{
int count = 0;
for (int i=n/2; i<=n; i++)
for (int j=1; j+n/2<=n; j = j++)
for (int k=1; k<=n; k = k * 2)
count++;

5.) Write an Algorithm of Quick sort. And also analyze its time complexity. Sort the
following items using Quick sort:
{10, 80, 30, 90, 40, 50, 70}
6.) Write the Merge sort Algorithm and sort the following sequence:
{23, 33, 25, 17, 35, 13, 9, 8}

You might also like