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

3/2/2012 Data Structures Calculating T (N)

The document provides instructions for students to analyze snippets of code and determine the number of assignment statements in each snippet. It includes 4 code snippets to analyze for an assignment on algorithm analysis that is due in the next class. Students are to determine the number of assignment statements in each snippet and solve problems from a specified textbook.

Uploaded by

Matt Carlberg
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 DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
184 views1 page

3/2/2012 Data Structures Calculating T (N)

The document provides instructions for students to analyze snippets of code and determine the number of assignment statements in each snippet. It includes 4 code snippets to analyze for an assignment on algorithm analysis that is due in the next class. Students are to determine the number of assignment statements in each snippet and solve problems from a specified textbook.

Uploaded by

Matt Carlberg
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 DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Data Structures & Algorithms Unit 2 Algorithm Analysis Matthew Carlberg Due Next Class For each of the

e following snippets of code, find the number of assignment statements, .

1.

2. def sumOfN2(n): y = n*(n+1)/2 return y

3. a = 5 b=6 c = 10 for i in range(n): for j in range(n): x = i*i y = j*j z = i*j for k in range(n): w = a*k + 45 v = b*b d = 33

4.

5.

6.

7.

8.

9.

Problems from Problem Solving with Algorithms and Data Structures Second Edition by Brad Miller and David Ranum

You might also like