Unit-1 Assignment-1-Questions
Unit-1 Assignment-1-Questions
VADAPALANI CAMPUS
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
18CSC204J- DESIGN AND ANALYSIS OF ALGORITHMS
Part Time
Assignment-1 from Unit-1
Questions
1. Apply step count method and analyze the algorithm segment. Find the time
complexity also
a.
b.
c.
b).
void transpose (int **a, int n)
{
for(int i =0;i<n;i++)
for(int j=j+1;j<n;j++)
swap(a[i][j],a[j][i]);
}
3. Apply Asymptotic Notations and find the positive constants c and n0 for
different cases. Given below
a.
b.
c.
d.
e.
f.
g.
h.
i. 3n2 - 100n + 6 = (n3)
a. T(n)=9T(n/3)+n
b. T(n) = T(2n/3)+1