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

Csc441 Quiz 1

This document is a quiz for a Design & Analysis of Algorithms course taken in Spring 2013. The quiz has two questions. The first question asks students to list at least four properties of an algorithm. The second question asks students to write the time complexity of two algorithms - the first has two nested for loops where the inner loop iterates n^2 times and the second has two nested for loops where the inner loop iterates 3j times. Students are given 15 minutes to complete the two-question quiz.

Uploaded by

asadhppy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
120 views1 page

Csc441 Quiz 1

This document is a quiz for a Design & Analysis of Algorithms course taken in Spring 2013. The quiz has two questions. The first question asks students to list at least four properties of an algorithm. The second question asks students to write the time complexity of two algorithms - the first has two nested for loops where the inner loop iterates n^2 times and the second has two nested for loops where the inner loop iterates 3j times. Students are given 15 minutes to complete the two-question quiz.

Uploaded by

asadhppy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Design & Analysis of Algorithms- Spring 2013 BSCS Quiz No.

1
Roll No ___________

20th February, 2013


Time: 15 minutes Total Marks: 10

Name:___________________________

Q1: State at least four distinct properties of an Algorithm. (4 marks) i)

ii)

iii)

iv)

Q2: Write the time complexity of following algorithms in the given space? (3+3 marks)

(a)

int x = 0; for ( int j = 1; j <= n/2; j++ ) for ( int k = 1; k <= n*n; k++ ) x = x + j + k;

(b)

int x = 0; for ( int j = 1; j <= n; j++ ) for ( int k = 1; k < 3*j; k++ ) x = x + j;

You might also like