Search for tag: "swap"

Lesson 30.5 Selection Sort

In the previous video we saw that insertion sort is not an ideal sorting algorithm. In this video we try our hand at another algorithm: selection sort. This is another simple algorithm that may be…

From  Hannah Lee 36 plays

Lesson 30.4 Sorting Performance

Through the course, we have only cared about specifications, and not performance. But as we see in this video, sorting is an application where performance really matters. Little changes to the size…

From  Hannah Lee 41 plays

Lesson 15.7 Mutable List Functions

Because lists are mutable, just like general objects, we can modify them in the body of a function. In this video we show how to write mutable list functions, which are (typically) procedures that…

From  Hannah Lee 72 plays

Lesson 12.6 Global Variables

With both modules and function definitions, we saw that global variables are incredibly important. But most of our code is inside of function definitions, and therefore executed inside of call…

From  Hannah Lee 73 plays