Search for tag: "function"

Zoom Dec. 8. Coroutines

Generators may seem like a weird detour for this late in the course. But in this presentation, we show how they are used in graphics and animation.Generators are a specific example of a concept known…

From  Hannah Lee on December 10th, 2020 10 plays

Lesson 30.7 Quicksort

The partition algorithm breaks up the list into two kind-of-sorted portions. In this video, we show how to use this fact with divide-and-conquer to implement a new sorting algorithm: quicksort. For…

From  Hannah Lee on December 10th, 2020 7 plays

Lesson 30.6 The Partition algorithm

In the previous video, we saw that nested loops are causing our sorting algorithms to be slow. To speed things up, we need to get rid of one of these loops. To do that, we will need a special…

From  Hannah Lee on December 10th, 2020 7 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 8 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 7 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

SOIL Seminar: An Indexed Type System for Fast and Safe WebAssembly

Title: An Indexed Type System for Fast and Safe WebAssembly Speaker: Adam Geller—University of British Columbia Summary: Often in low-level languages (i.e., assembly languages), potentially…

From  Ross Tate on December 7th, 2020 14 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

Lesson 29.8 Native Coroutines (OPTIONAL)

This video introduces an advanced topic that is completely optional and is not relevant to the final assignment. If you Google Python and coroutines, you will get something very different than what…

From  Hannah Lee on December 3rd, 2020 10 plays

Lesson 29.7 Time Budgeting (OPTIONAL)

This video is not optional because the material is advanced. It is optional because it is not relevant for the final assignment. However, you may be interested in this video if you want to see…

From  Hannah Lee on December 3rd, 2020 11 plays

Lesson 29.3 Generators Revisited

In the previous video, we said that generators are a type of coroutine. In this video, we explore this idea. We use yield statements to write generators that are a little more sophisticated than…

From  Hannah Lee on December 3rd, 2020 34 plays

Lesson 29.2 Coroutines

In the previous video we introduced the term coroutine but did not actually define it. In this video we give a more concrete definition. As a result, we see that coroutines and generators have a lot…

From  Hannah Lee on December 3rd, 2020 31 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