Management - Presentation Skills, What They Never Teach You (v1.9)
Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn...
-
Upload
emily-todd -
Category
Documents
-
view
214 -
download
0
Transcript of Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn...
![Page 1: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/1.jpg)
Teacher Talk2011
![Page 2: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/2.jpg)
1. There has never been a better time to teach Computer Science
2. We can learn from Chemistry, Physics, Biology, …
![Page 3: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/3.jpg)
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
![Page 4: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/4.jpg)
Sorting, what’s that then?
Given a collection of data, get it into order …
![Page 5: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/5.jpg)
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
![Page 6: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/6.jpg)
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
![Page 7: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/7.jpg)
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
![Page 8: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/8.jpg)
Sorting, what’s that then?
Sorting is the process of going from this
0 2 3 4 5 6 7 9
9 2 6 0 4 3 2 7 5
to that
![Page 9: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/9.jpg)
Sorting, why bother?
9 2 6 0 4 3 2 7 5
Who cares?
You can find things quicker!
![Page 10: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/10.jpg)
Sorting, why bother?
0 2 3 4 5 6 7 9
9 2 6 0 4 3 2 7 5
Who cares?
You can find things quicker!
Use “binary search” (or even linear search and stop early)
![Page 11: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/11.jpg)
Sorting, why bother?Who cares?
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?
![Page 12: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/12.jpg)
Sorting, why bother?Who cares?
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?
![Page 13: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/13.jpg)
Sorting, why bother?Who cares?
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?
![Page 14: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/14.jpg)
Sorting, why bother?Who cares?
![Page 15: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/15.jpg)
Sorting, why bother?Who cares?
What do you prefer?
![Page 16: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/16.jpg)
Some algorithms for sorting
• bubble sort• insertion sort• selection sort• shell sort• gnome sort• merge sort• quick sort• heap sort• radix sort• bead sort
sorting
![Page 17: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/17.jpg)
Some algorithms for sorting
• bubble sort• insertion sort• selection sort• shell sort• gnome sort• merge sort• quick sort• heap sort• radix sort• bead sort
sorting
What’s an algorithm?
![Page 18: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/18.jpg)
![Page 19: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/19.jpg)
![Page 20: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/20.jpg)
Some algorithms for sorting
• bubble sort• insertion sort• selection sort• shell sort• gnome sort• merge sort• quick sort• heap sort• radix sort• bead sort
sorting
quadratic
![Page 21: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/21.jpg)
Some algorithms for sorting
• bubble sort• insertion sort• selection sort• shell sort• gnome sort• merge sort• quick sort• heap sort• radix sort• bead sort
sorting
logarithmic
![Page 22: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/22.jpg)
Some algorithms for sorting
• bubble sort• insertion sort• selection sort• shell sort• gnome sort• merge sort• quick sort• heap sort• radix sort• bead sort
sorting
linear
![Page 23: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/23.jpg)
Some algorithms for sorting
• bubble sort• insertion sort• selection sort• shell sort• gnome sort• merge sort• quick sort• heap sort• radix sort• bead sort
sorting
Our example
![Page 24: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/24.jpg)
![Page 25: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/25.jpg)
![Page 26: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/26.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
9 2 06 4 3 2 57
Example
![Page 27: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/27.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
9 2 06 4 3 2 57
Example
compare
![Page 28: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/28.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 9 06 4 3 2 57
Example
swap
![Page 29: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/29.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 9 06 4 3 2 57
Example
compare
![Page 30: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/30.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 09 4 3 2 57
Example
swap
![Page 31: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/31.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 09 4 3 2 57
Example
compare
![Page 32: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/32.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 90 4 3 2 57
Example
swap
![Page 33: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/33.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 90 4 3 2 57
Example
compare
![Page 34: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/34.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 9 3 2 57
Example
swap
![Page 35: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/35.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 9 3 2 57
Example
compare
![Page 36: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/36.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 3 9 2 57
Example
swap
![Page 37: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/37.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 3 9 2 57
Example
compare
![Page 38: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/38.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 3 2 9 57
Example
swap
![Page 39: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/39.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 3 2 9 57
Example
compare
![Page 40: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/40.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 3 2 7 59
Example
swap
![Page 41: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/41.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 3 2 7 59
Example
compare
![Page 42: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/42.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 3 2 7 95
Example
swap
![Page 43: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/43.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 3 2 7 95
Example
![Page 44: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/44.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 3 2 7 95
Example
compare
![Page 45: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/45.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 3 2 7 95
Example
compare
![Page 46: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/46.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 46 3 2 7 95
Example
swap
![Page 47: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/47.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 46 3 2 7 95
Example
compare
![Page 48: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/48.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 64 3 2 7 95
Example
swap
![Page 49: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/49.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 64 3 2 7 95
Example
compare
![Page 50: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/50.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 34 6 2 7 95
Example
swap
![Page 51: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/51.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 34 6 2 7 95
Example
compare
![Page 52: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/52.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 34 2 6 7 95
Example
swap
![Page 53: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/53.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 34 2 6 7 95
Example
compare
![Page 54: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/54.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 34 2 6 7 95
Example
compare
![Page 55: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/55.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 34 2 6 5 97
Example
swap
![Page 56: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/56.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 34 2 6 5 97
Example
![Page 57: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/57.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 34 2 6 5 97
Example
Are you tired yet? Bored?
![Page 58: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/58.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 34 2 6 5 97
Example
compare
![Page 59: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/59.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 34 2 6 5 97
Example
swap
![Page 60: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/60.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 34 2 6 5 97
Example
compare
![Page 61: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/61.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 34 2 6 5 97
Example
compare
![Page 62: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/62.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 43 2 6 5 97
Example
swap
![Page 63: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/63.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 43 2 6 5 97
Example
compare
![Page 64: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/64.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 23 4 6 5 97
Example
swap
![Page 65: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/65.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 23 4 6 5 97
Example
compare
![Page 66: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/66.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 23 4 6 5 97
Example
compare
![Page 67: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/67.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 23 4 5 6 97
Example
swap
![Page 68: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/68.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 23 4 5 6 97
Example
![Page 69: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/69.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 23 4 5 6 97
Example
compare
![Page 70: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/70.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 23 4 5 6 97
Example
compare
![Page 71: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/71.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 23 4 5 6 97
Example
compare
![Page 72: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/72.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
Example
swap
![Page 73: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/73.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
Example
compare
![Page 74: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/74.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
Example
compare
![Page 75: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/75.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
Example
![Page 76: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/76.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
Example
compare
![Page 77: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/77.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
Example
compare
![Page 78: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/78.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
Example
compare
![Page 79: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/79.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
Example
compare
![Page 80: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/80.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
Example
![Page 81: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/81.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
Example
Phew!
![Page 82: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/82.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
On an Array
![Page 83: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/83.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
9 2 06 4 3 2 57
Example
i=8
![Page 84: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/84.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
9 2 06 4 3 2 57
Example
compare
i=8j=0
![Page 85: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/85.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 9 06 4 3 2 57
Example
swap
Example
i=8j=0
![Page 86: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/86.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 9 06 4 3 2 57
Example
compare
ExampleExample
i=8j=1
![Page 87: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/87.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 09 4 3 2 57
Example
swap
ExampleExampleExample
i=8j=1
![Page 88: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/88.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 09 4 3 2 57
Example
compare
ExampleExampleExampleExample
i=8j=2
![Page 89: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/89.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 90 4 3 2 57
Example
swap
ExampleExampleExampleExampleExample
i=8j=2
![Page 90: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/90.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 90 4 3 2 57
Example
compare
ExampleExampleExampleExampleExampleExample
i=8j=3
![Page 91: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/91.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 9 3 2 57
Example
swap
ExampleExampleExampleExampleExampleExampleExample
i=8j=3
![Page 92: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/92.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 9 3 2 57
Example
compare
ExampleExampleExampleExampleExampleExampleExampleExample
i=8j=4
![Page 93: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/93.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 3 9 2 57
Example
swap
ExampleExampleExampleExampleExampleExampleExampleExampleExample
i=8j=4
![Page 94: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/94.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 3 9 2 57
Example
compare
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=8j=5
![Page 95: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/95.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 3 2 9 57
Example
swap
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=8j=5
![Page 96: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/96.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 3 2 9 57
Example
compare
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=8j=6
![Page 97: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/97.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 3 2 7 59
Example
swap
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=8j=6
![Page 98: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/98.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 3 2 7 59
Example
compare
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=8j=7
![Page 99: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/99.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 3 2 7 95
Example
swap
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=8j=7
![Page 100: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/100.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 3 2 7 95
Example sortingExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
![Page 101: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/101.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 3 2 7 95
Example
compare
sortingExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=7j=0
![Page 102: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/102.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 6 40 3 2 7 95
Example
compare
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=7j=1
![Page 103: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/103.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 46 3 2 7 95
Example
swap
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=7j=1
![Page 104: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/104.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 46 3 2 7 95
Example
compare
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=7j=2
![Page 105: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/105.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 64 3 2 7 95
Example
swap
sortingExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=7j=2
![Page 106: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/106.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 64 3 2 7 95
Example
compare
sortingExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=7j=3
![Page 107: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/107.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 34 6 2 7 95
Example
swap
sortingExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=7j=3
![Page 108: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/108.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 34 6 2 7 95
Example
compare
sortingExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=7j=4
![Page 109: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/109.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 34 2 6 7 95
Example
swap
sortingExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=7j=4
![Page 110: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/110.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 34 2 6 7 95
Example
compare
sortingExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=7j=5
![Page 111: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/111.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 34 2 6 7 95
Example
compare
sortingExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=7j=6
![Page 112: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/112.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 34 2 6 5 97
Example
swap
sortingExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=7j=6
![Page 113: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/113.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 34 2 6 5 97
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
![Page 114: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/114.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
2 0 34 2 6 5 97
Example
compare
sortingExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=6j=0
![Page 115: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/115.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 34 2 6 5 97
Example
swap
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=6j=0
![Page 116: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/116.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 34 2 6 5 97
Example
compare
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=6j=1
![Page 117: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/117.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 34 2 6 5 97
Example
compare
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=6j=2
![Page 118: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/118.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 43 2 6 5 97
Example
swap
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=6j=2
![Page 119: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/119.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 43 2 6 5 97
Example
compare
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=6j=3
![Page 120: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/120.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 23 4 6 5 97
Example
swap
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=6j=3
![Page 121: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/121.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 23 4 6 5 97
Example
compare
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=6j=4
![Page 122: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/122.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 23 4 6 5 97
Example
compare
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=6j=5
![Page 123: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/123.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 23 4 5 6 97
Example
swap
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=6j=5
![Page 124: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/124.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 23 4 5 6 97
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
![Page 125: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/125.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 23 4 5 6 97
Example
compare
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=5j=0
![Page 126: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/126.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 23 4 5 6 97
Example
compare
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=5j=1
![Page 127: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/127.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 23 4 5 6 97
Example
compare
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=5j=2
![Page 128: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/128.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
Example
swap
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=5j=2
![Page 129: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/129.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
Example
compare
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=5j=3
![Page 130: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/130.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
Example
compare
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=5j=4
![Page 131: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/131.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
![Page 132: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/132.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
Example
compare
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=4j=0
![Page 133: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/133.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
Example
compare
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=4j=1
![Page 134: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/134.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
Example
compare
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=4j=2
![Page 135: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/135.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
Example
compare
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
i=4j=3
![Page 136: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/136.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
![Page 137: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/137.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
ExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExampleExample
![Page 138: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/138.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
Example
![Page 139: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/139.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
0 2 32 4 5 6 97
Example
Phew!
![Page 140: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/140.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
On an Array
Can we visualize this?
![Page 141: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/141.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
On an Array
Can we visualize this?
Assume we have a random list of numbers from 0 to n-1, put in an array ASuch that A[0] is the 1st number and A[n-1] is the last
![Page 142: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/142.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
On an Array
Can we visualize this?
Assume we have a random list of numbers from 0 to n-1, put in an array ASuch that A[0] is the 1st number and A[n-1] is the last
9 2 06 4 3 2 57
![Page 143: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/143.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
On an Array
Can we visualize this?
Assume we have a random list of numbers from 0 to n-1, put in an array ASuch that A[0] is the 1st number and A[n-1] is the last
9 2 06 4 3 2 57
A[0] A[1] A[2] A[3] A[4] A[5] A[6] A[7] A[8]
![Page 144: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/144.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
On an Array
Can we visualize this?
Assume we have a random list of numbers from 0 to n-1, put in an array ASuch that A[0] is the 1st number and A[n-1] is the last
9 2 06 4 3 2 57
A[0] A[1] A[2] A[3] A[4] A[5] A[6] A[7] A[8]
We could plot A[i] on a graph as a point with x/y coordinates i/A[i]
![Page 145: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/145.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
On an Array
Can we visualize this?
Assume we have a random list of numbers from 0 to n-1, put in an array ASuch that A[0] is the 1st number and A[n-1] is the last
9 2 06 4 3 2 57
A[0] A[1] A[2] A[3] A[4] A[5] A[6] A[7] A[8]
We could plot A[i] on a graph as a point with x/y coordinates i/A[i]
Do this as the algorithm progress to see how it progresses.
![Page 146: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/146.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
On an Array
Can we visualize this?
Assume we have a random list of numbers from 0 to n-1, put in an array ASuch that A[0] is the 1st number and A[n-1] is the last
9 2 06 4 3 2 57
A[0] A[1] A[2] A[3] A[4] A[5] A[6] A[7] A[8]
We could plot A[i] on a graph as a point with x/y coordinates i/A[i]
Do this as the algorithm progress to see how it progresses.
Ready?
![Page 147: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/147.jpg)
Quadratic algorithms
• bubble sort• insertion sort• selection sort
sorting
Bubble Sort
On an Array
![Page 148: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/148.jpg)
sorting
Bubble Sort
Show me more!
![Page 149: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/149.jpg)
sorting
Bubble Sort
Show me more!
• different sorting algorithms and relative performance• a beauty contest
• what is the “sound” of sorting?• can you show me it by mime? Expressive dance?
![Page 150: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/150.jpg)
sorting
Bubble Sort
NOTE to self:Bubble sort is a quadratic time algorithm.If I have to sort a data set of N objects the run time will be proportional to N2
![Page 151: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/151.jpg)
sorting
Bubble Sort
NOTE to self:Bubble sort is a quadratic time algorithm.If I have to sort a data set of N objects the run time will be proportional to N2
To sort 10 numbers will take 100 units of time
![Page 152: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/152.jpg)
sorting
Bubble Sort
NOTE to self:Bubble sort is a quadratic time algorithm.If I have to sort a data set of N objects the run time will be proportional to N2
To sort 10 numbers will take 100 units of timeTo sort 100 numbers will take 10,000 units of time
![Page 153: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/153.jpg)
sorting
Bubble Sort
NOTE to self:Bubble sort is a quadratic time algorithm.If I have to sort a data set of N objects the run time will be proportional to N2
To sort 10 numbers will take 100 units of timeTo sort 100 numbers will take 10,000 units of timeTo sort 1000 numbers will take 1,000,000 units of time
![Page 154: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/154.jpg)
Links
• sorting algorithm animation• sound of sorting (part 1)• sound of sorting (part 2)• bubble sort by folk dancing
![Page 156: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/156.jpg)
I think there has never been a better time to teach Computer Science
end of part 1
![Page 157: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/157.jpg)
![Page 158: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/158.jpg)
![Page 159: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/159.jpg)
![Page 160: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/160.jpg)
![Page 161: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/161.jpg)
![Page 162: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/162.jpg)
Live dangerously … live like a teacher, like a Physics teacher,or Chemistry, or Biology, or …
Balanced binary trees … without powerpoint
![Page 164: Teacher Talk 2011. 1.There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …](https://reader038.fdocuments.net/reader038/viewer/2022110214/5697bf7a1a28abf838c83175/html5/thumbnails/164.jpg)
Live dangerously