We will continue talking about sorting and algorithmic analysis. # To prepare for lecture: We will talk about selection sort and insertion sort, including their implementation in Python code and their run times algorithmically speaking. The following videos give high level descriptions: - <a href="https://www.youtube.com/watch?v=g-PGLbMth_g">Selection sort in 3 minutes</a> - <a href="https://www.youtube.com/watch?v=JU767SDMDvA">Insertion sort in 2 minutes</a> In the last few seconds of each video the presenter mentions the big-O running time of each algorithm. You can watch the following, which is his short video introducing big-O notation, but it's ok if you don't. I will talk about it more. - <a href="https://www.youtube.com/watch?v=__vX2sjlpXU">Big-O notation in 5 minutes -- The basics</a> Finally, in case this matches with your learning style, the following videos present the algorithms in dance form: - <a href="https://www.youtube.com/watch?v=Ns4TPTC8whw">Select-sort with Gypsy folk dance</a> - <a href="https://www.youtube.com/watch?v=ROalU379l3U">Insert-sort with Romanian folk dance</a> # Notes from after lecture: First, my apologies for not starting to record until we were already 30 minutes into the lecture (and thank you to the anonymous person who pointed this out to me!). The video is missing the discussion of selection sort and the first part of the discussion on insertion sort. These are both standard sorting algorithms, so if you missed the cs51p lecture I would suggest watching the videos above and then taking a look at the pdf notes and the code from today. - The marked up version of the notes is <a href="./exercises39_markup.pdf">here</a>. The code is <a href="./lec39code.py">here</a>. - The video is on Box and available <a href="https://pomona.box.com/s/2krmictk57qcyuxqyww5brj5op185gyn">here</a>. - Assignment10 is available on piazza as well as <a href="./Assignment10.docx">here</a>.