Time Complexity for Non-recursive Sorting
Unit Computational Step:
Comparing/swapping two numbers.
Problem Size:
Number of elements to be sorted.
Execution Time:
Sorting 5 elements takes 4+3+2+1 = 10 units of time.
Establish Time Complexity Relationship:
Sorting N elements using successive maxima takes
Time Complexity = N*(N-1)/2