CS100A Lecture 14
Sorting
Inspiration from Example
Algorithm: Selection Sort
Iterative Refinement
Loop Invariant
Loop Invariant, cont.
Refine the Loop Body
Refine One Subpart
Refine Other Subpart
Loop Invariant (for Inner Loop)
Final Function
Rearrange Related Data at Same Time
Download presentation source