0% found this document useful (0 votes)
5 views1 page

CSE 208 Algorithm Lab Assignment 1

The document is an assignment for CSE 208: Algorithm Lab at the University of Asia Pacific. It includes three questions: deriving the time complexity of a nested loop, showing the upper bound of time complexity for computing combinations, and solving a recurrence relation using the iteration method. Each question is assigned a specific point value.

Uploaded by

arnob
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

CSE 208 Algorithm Lab Assignment 1

The document is an assignment for CSE 208: Algorithm Lab at the University of Asia Pacific. It includes three questions: deriving the time complexity of a nested loop, showing the upper bound of time complexity for computing combinations, and solving a recurrence relation using the iteration method. Each question is assigned a specific point value.

Uploaded by

arnob
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

University of Asia Pacific

Department of Computer Science & Engineering


CSE 208: Algorithm Lab
Section: D2
Assignment - 1

Question 1: Derive the time complexity of the following code.


4
1. for (int i = n; i > 0; i /= 2)
2. for (int j = 0; j < i; j++)
3. printf(“*”);

Question 2. Show that the upper bound of time complexity of computing nCr (combination) is
O(n!)

Question 3. Solve the following recurrence relation using the iteration method.

T (n)=7 T (n−1)

You might also like