Sorting usually makes use of search. Watch these lectures on linear and binary search, and note how the use of sorting can also improve search performance, in some cases. These lectures make mention of Python code but that part can be ignored since the lectures stand alone. They explain the basics of the algorithm well and in such a way that the brief exposure of code is only ancillary. Another point: A lot of time is spent discussing list representation. Do not ignore that part of the discussion. How a list is represented makes a huge difference in search and sort performance.
- Video 1: Lec 9 | MIT 6.00SC Introduction to Computer Science and Programming, Spring 2011
- Video 2: Lec 9 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Source: John Guttag, https://www.youtube.com/watch?v=UNHQ7CRsEtU&feature=emb_logo
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 License.