QuickNotes™ 
Program Analysis, Part II
The analysis of a program means how complex and efficient a program is.
Efficiency of a program means how much resources and time does a program take to perform a task. In many cases most program are either efficient in their use of resources or are efficient in the amount of time they take to perform the task.
Complexity of an algorithm means how difficult is the solution to understand and implement.
Big O notation is used to represent the efficiency of a program, it is not precise, but is a very close estimate. Some of the common Big O are:
O(log n) means to process a list containing n elements took one iteration (loop), but the list was shortened each time by half.
O(n) means to process a list containing n elements took one iteration (loop)
O(n log n) means to process a list containing n elements it takes a pair of nested loop but the list is reduced by half each time in the inner iteration (loop)
O(n2 ) means to process a list containing n elements, it takes a pair of nested loops.













