Search for tag: "recursion"
Lesson 26.5 While-Loops vs For-LoopsWe can always replace for-loops with while-loops, but should we? In this video we talk about the trade-offs of the two control structures and why it might be better to use over the other.
From Hannah Lee
81 plays
|
|
Zoom Oct. 22. More RecursionThe 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
63 plays
|
|
Zoom Oct. 20. RecursionRecursion 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
50 plays
|
|
Lesson 17.10 Recursion and Helper FunctionsDivide-and-conquer is not the only example of recursion. It just happens to be one of the most interesting. But in this video we show that even some of the simplest of recursive definitions become…
From Hannah Lee
337 plays
|
|
Lesson 17.8 Recursion PerformanceIn this video, we show another reason to pay attention to the division step: performance. In fact, we show an example where a change in how we divide the data can improve performance by several…
From Hannah Lee
91 plays
|
|
Lesson 17.6 Divide and Conquer VisualizationJust because you know how to write a divide-and-conquer algorithm does not mean you understand it. In this video we try to improve our understanding by visualizing divide-and-conquer. When we do this…
From Hannah Lee
168 plays
|
|
Lesson 17.5 Divide and Conquer DesignNow that we understand divide-and-conquer, it is type to implement it in Python. In this video we show you a three-step sequence for writing a function definition using this technique.
From Hannah Lee
126 plays
|
|
Lesson 17.4 Divide and ConquerRecursion has many, many uses. But one of the most popular applications is divide-and-conquer. In this video we introduce this new concept and show how we will use to solve several problems on…
From Hannah Lee
121 plays
|
|
Lesson 17.3 Recursion and the Call StackBecause a recursive function calls itself, it will have multiple call frames on the call stack. In this video we show exactly why we should be concerned about this and why it will affect our function…
From Hannah Lee
156 plays
|
|
Lesson 17.2 Recursive FunctionsIn this video we show how to take recursive definitions from mathematics and implement them in Python. To do this, we will need to have a function call itself in its own definition.
From Hannah Lee
133 plays
|
|
Lesson 17.1 Recursive DefinitionsRecursion is a general concept that does not just apply to programming languages. In this video we show that recursion exists in mathematics and even natural language.
From Hannah Lee
130 plays
|
|