Work through the list without notes. If you cannot do a statement, follow its link, then come back. Guide = study guide; Practice = practice questions.
Understanding
- I can define a statement execution count. (Guide: “Counting work, not seconds”; Practice question 1)
- I can say how many times each part of a for loop header runs. (Guide: “Counting a single loop”; Practice question 2)
- I can explain why the count of a loop with an early exit depends on the data, and name the best and worst case. (Guide: “Early exits: it depends on the data”; Practice question 6)
- I can explain what “informal run-time comparison” means. (Guide: “Comparing two algorithms”; Practice question 10)
Skills
- I can count the iterations of a loop that steps by more than 1 or that doubles or halves its variable. (Guide: “Different steps”; Practice questions 1 and 9)
- I can count the executions of statements in a nested loop with independent or dependent bounds. (Guide: “Counting nested loops” and Worked example 1; Practice questions 3, 4 and 7)
- I can compare the execution counts of two code segments for the same value of n. (Guide: Worked example 2; Practice question 5)
- I can tell how the count changes when n doubles. (Guide: “Counting nested loops”; Practice question 9)
Reasoning
- I can say which of two algorithms does less work in the worst case, using counts rather than timing. (Guide: “Comparing two algorithms”; Practice questions 8 and 10)
- I can explain why a saving by a constant factor, such as half, differs from a change in how the count grows. (Practice question 8)
- I can work out which call of a method with an early exit does the most work. (Practice question 6)
All ticked? Take the Unit 2 diagnostic, then try the Unit 2 review.