1 / 164

Teacher Talk 2011

Teacher Talk 2011. There has never been a better time to teach Computer Science We can learn from Chemistry, Physics, Biology, …. What am I going to show you?. First, I will use sorting to demonstrate “This is the best time to teach CS”.

hoang
Download Presentation

Teacher Talk 2011

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Teacher Talk 2011

  2. There has never been a better time to teach Computer Science • We can learn from Chemistry, Physics, Biology, …

  3. What am I going to show you? First, I will use sorting to demonstrate “This is the best time to teach CS” Second, I will use binary trees (and AVL trees) to show we can do what Chemists do

  4. Sorting, what’s that then? Given a collection of data, get it into order …

  5. Sorting, what’s that then? Given a collection of data, get it into order … 9 2 6 0 4 3 2 7 5 This is NOT in order

  6. Sorting, what’s that then? Given a collection of data, get it into order … 0 2 3 4 5 6 7 9 This is IS in order

  7. Sorting, what’s that then? Given a collection of data, get it into order … 0 2 3 4 5 6 7 9 This is IS in order It’s in ascending order

  8. Sorting, what’s that then? Sorting is the process of going from this 9 2 6 0 4 3 2 7 5 to that 0 2 3 4 5 6 7 9

  9. Who cares? Sorting, why bother? 9 2 6 0 4 3 2 7 5 You can find things quicker!

  10. Who cares? Sorting, why bother? 9 2 6 0 4 3 2 7 5 You can find things quicker! 0 2 3 4 5 6 7 9 Use “binary search” (or even linear search and stop early)

  11. Who cares? Sorting, why bother? Do you remember the telephone directory? Imagine if it was just in any order (random) How long would it take you to find my telephone number?

  12. Who cares? Sorting, why bother? Do you remember the telephone directory? Imagine if it was just in any order (random) How long would it take you to find my telephone number? Do you remember the dictionary? Imagine if that was just in any order. How long would it take to find a word, or to determine if the word was not present?

  13. Who cares? Sorting, why bother? Do you remember the telephone directory? Imagine if it was just in any order (random) How long would it take you to find my telephone number? Do you remember the dictionary? Imagine if that was just in any order. How long would it take to find a word, or to determine if the word was not present? Do you ever use an online spelling checker? How does that work?

  14. Who cares? Sorting, why bother?

  15. Who cares? Sorting, why bother? What do you prefer?

  16. sorting • Some algorithms for sorting • bubble sort • insertion sort • selection sort • shell sort • gnome sort • merge sort • quick sort • heap sort • radix sort • bead sort

  17. sorting What’s an algorithm? • Some algorithmsfor sorting • bubble sort • insertion sort • selection sort • shell sort • gnome sort • merge sort • quick sort • heap sort • radix sort • bead sort

  18. sorting • Some algorithms for sorting • bubble sort • insertion sort • selection sort • shell sort • gnome sort • merge sort • quick sort • heap sort • radix sort • bead sort quadratic

  19. sorting • Some algorithms for sorting • bubble sort • insertion sort • selection sort • shell sort • gnome sort • merge sort • quick sort • heap sort • radix sort • bead sort logarithmic

  20. sorting • Some algorithms for sorting • bubble sort • insertion sort • selection sort • shell sort • gnome sort • merge sort • quick sort • heap sort • radix sort • bead sort linear

  21. sorting • Some algorithms for sorting • bubble sort • insertion sort • selection sort • shell sort • gnome sort • merge sort • quick sort • heap sort • radix sort • bead sort Our example

  22. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 9 2 6 0 4 3 2 7 5 Bubble Sort

  23. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 9 2 6 0 4 3 2 7 5 compare Bubble Sort

  24. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 9 6 0 4 3 2 7 5 swap Bubble Sort

  25. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 9 6 0 4 3 2 7 5 compare Bubble Sort

  26. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 6 9 0 4 3 2 7 5 swap Bubble Sort

  27. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 6 9 0 4 3 2 7 5 compare Bubble Sort

  28. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 6 0 9 4 3 2 7 5 swap Bubble Sort

  29. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 6 0 9 4 3 2 7 5 compare Bubble Sort

  30. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 6 0 4 9 3 2 7 5 swap Bubble Sort

  31. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 6 0 4 9 3 2 7 5 compare Bubble Sort

  32. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 6 0 4 3 9 2 7 5 swap Bubble Sort

  33. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 6 0 4 3 9 2 7 5 compare Bubble Sort

  34. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 6 0 4 3 2 9 7 5 swap Bubble Sort

  35. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 6 0 4 3 2 9 7 5 compare Bubble Sort

  36. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 6 0 4 3 2 7 9 5 swap Bubble Sort

  37. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 6 0 4 3 2 7 9 5 compare Bubble Sort

  38. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 6 0 4 3 2 7 5 9 swap Bubble Sort

  39. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 6 0 4 3 2 7 5 9 Bubble Sort

  40. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 6 0 4 3 2 7 5 9 compare Bubble Sort

  41. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 6 0 4 3 2 7 5 9 compare Bubble Sort

  42. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 0 6 4 3 2 7 5 9 swap Bubble Sort

  43. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 0 6 4 3 2 7 5 9 compare Bubble Sort

  44. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 0 4 6 3 2 7 5 9 swap Bubble Sort

  45. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 0 4 6 3 2 7 5 9 compare Bubble Sort

  46. Quadratic algorithms • bubble sort • insertion sort • selection sort Example sorting 2 0 4 3 6 2 7 5 9 swap Bubble Sort

More Related