Search for tag: "element"

Lesson 30.8 Quicksort Performance

It looks like quicksort has solved our performance problems. However, we should not be so hasty. In this video, we look at the real performance for quicksort, and why it is not perfect. We also talk…

From  Hannah Lee on December 10th, 2020 8 plays

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 on December 10th, 2020 8 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 on December 10th, 2020 9 plays

Lesson 30.3 Insertion Sort

In this video we introduce insertion sort, which is one of the simplest sorting algorithms to understand. If you have ever sorted cards in your hand it is likely that you have used this sorting…

From  Hannah Lee on December 10th, 2020 8 plays

Lesson 30.1 Searching

In this video, we look at the different ways we can search a list for an element. In doing so, we see that it helps a lot for our lists to be sorted. Hence that will be our focus for the rest of this…

From  Hannah Lee on December 10th, 2020 8 plays

Zoom Dec. 3. Generators

In this presentation we will review, generators which lead into the last major topic of the course (coroutines). Once again, this will involve a lot of visualization.We also start off this…

From  Hannah Lee on December 3rd, 2020 12 plays

Lesson28.8 List Comprehension (OPTIONAL)

This video is not optional because the material is advanced. It is optional because this video series has run long and this topic is less important for you to know. When we are done with out…

From  Hannah Lee on December 3rd, 2020 6 plays

Lesson 28.6 map and filter

In this video we talk about two very famous generators: map and filter. We show how to use these to replace writing code with a for-loop.

From  Hannah Lee on December 3rd, 2020 26 plays

Lesson 28.5 Generator Design

Now that we know how generators work, it is time to write our own. In this video we show how easy it is. We just take out experience with the accumulator pattern and replace the accumulator with a…

From  Hannah Lee on December 3rd, 2020 25 plays

Lesson 28.2 Iterable Classes

In this video, we show how to make our own iterable and iterator classes. These are actually tightly linked, and you need one to create the other.

From  Hannah Lee on December 3rd, 2020 26 plays

Lesson 28.1 Iterators

We are familiar with iterables, types that we can use in a for-loop. In this video we introduce the iterator. This is a type that can be used in a for-loop, but we can also manually step through the…

From  Hannah Lee on December 3rd, 2020 28 plays

Lesson 26.6 Mutable While-Loops

In this video we show that the one place we typically prefer while-loops is when we are modifying a list or other mutable iterable. While we did see how to do this with for-loops (by looping over…

From  Hannah Lee on November 12th, 2020 36 plays

Lesson 23.6 The Python Data Model

Python has a lot of special methods than begin and end with double underscores. Together than make up the Python Data Model. In this video we look at the documentation of these methods and try to…

From  Hannah Lee on November 8th, 2020 36 plays

Zoom Oct. 27. Nested Lists and Dictionaries

This presentation explores the last built-in (as opposed to user-defined) types in this course. These types are often used to store data in files.We actually had an (accidental) sneak peak at these…

From  Hannah Lee on October 27th, 2020 7 plays

Zoom Oct. 22. More Recursion

The divide-and-conquer examples we saw in the previous session were on the easy side. In this session we look at some much more challenging examples.Included in this session is segregate, the most…

From  Hannah Lee on October 27th, 2020 6 plays

Zoom Oct. 20. Recursion

Recursion is a powerful programming tool and one of the fundamental principles of computer science. It is used in many advanced algorithms.In this session, we will just focus on divide-and-conquer,…

From  Hannah Lee on October 27th, 2020 10 plays