class: middle, center # Lecture 9 ### 18 October 2021 .smaller[ Admin Matters
Unit 22: Searching
Unit 23: Sorting
] --- ![burnout](figures/meme/week0-10.jpg) --- class: middle ### Catch-Up Session III - Saturday, 23 October, 2 pm - 4 pm --- class: middle ### PE2 - Wish to take PE2 On-site? Fill up the survey before tomorrow night. --- class: middle ```C long fib(long n) { if (n == 1 || n == 2) { return 1; } return fib(n-1) + fib(n-2); } ``` --- class: middle, center ## Searching --- class: middle,center ## Sorting --- class: middle ### Counting Sort vs. Selection Sort - Counting sort is fast because the range of the inputs is limited - Selection sort is slower and is more general --- class: middle ### Bubble Sort and Insertion Sort --- class: bottom .tiny[ Version: 1.0 Last Updated: Mon Oct 18 11:42:59 +08 2021 ]