Lesson 2.2: Selection Sort

Video Lesson:

Slides Annotated Slides Video
2.2-selection-sort.pdf Download 2.2-selection-sort.pdf  2.2-selection-sort-annotated.pdf Download 2.2-selection-sort-annotated.pdf  

https://ubc.zoom.us/rec/share/mkhXdp3_KFtMIdwIqdJ_nafmvy0gbfW63ZxJ6HSC-b5Dfege_7bT6EIWwpBLjaYJ.pYpSO3xA9g1HpODE Links to an external site.

Access Passcode: YMk%7=^1


Readings:


Summary:

Nearly every Data Structures and Algorithms course in the world uses a simple iterative algorithm called Selection Sort as a perfect first example of analysis. In this lesson we compute the running time of Selection Sort, and we prove that it actually works! 


Learning Outcomes:

Upon completion off this lesson, students will be able to:

  • recognize and execute selection sort on an array of values
  • evaluate the running time of selection sort
  • use the selection sort loop invariant to determine an iteration number