Please enable JavaScript to use CodeHS

Chapter 4


4.5 Informal Code Analysis


Program Efficiency

Statement Execution Count

Loop Execution Count

while Loop Time

for Loop Time

Check Your Understanding

  1. Incorrect Correct No Answer was selected Invalid Answer

Exercise: Improving findChar Speed


Term Definition
Algorithm Step-by-step process that solves a problem.
Statement execution count The number of times a statement is executed by the program.
Big-O Notation A way to represent how long an algorithm will take to execute. It helps to determine how efficient different approaches to solving a problem are.