6. Recursion and Dictionaries

preview_player
Показать описание
MIT 6.0001 Introduction to Computer Science and Programming in Python, Fall 2016
Instructor: Prof. Eric Grimson

In this lecture, Prof. Grimson introduces the concept of recursion and the Python dictionary data type.

License: Creative Commons BY-NC-SA
Рекомендации по теме
Комментарии
Автор

Prof. Grimson should teach Introduction to Algorithms. He is clear and articulate.

stephfong
Автор

*My takeaways:*
1. What is recursion in the context of this lecture 3:47
2. An example: multiplication - iterative solution vs recursive solution 5:48
3. Recursion with one base case - factorial 9:25
4. Recursion with multiple base cases - Fibonacci numbers 24:38
4. Recursion on non-numerics 29:12
5. Dictionaries (mutable data structure contains "keys" and corresponding "values", it has no order, only matches "keys" to "values") 33:27
6. Key things about keys and values 39:10
7. List vs dictionaries 40:20
8. An example of using dictionaries 40:45
9. Efficient Fibonacci 46:18

leixun
Автор

More than what he taught, I loved how articulate and sure he was. Every word seemed measured. Lucky to get to experience this. Thank you MIT.

shaileshrana
Автор

The way he teachs is awesome. Fun + Good Content!

DanielFerreira-gudi
Автор

The part linking mathematical induction to recursion is genius. Thank you so much!

simenghan
Автор

People like this should open their own school. Truly amazing professor, no wonder CS grads from MIT are so talented.

genealso
Автор

So even professors at MIT would first just run the exact same program again without changing anything when they meet a bug lol

bcjbxfy
Автор

Prof. Grimson is one of my very best teachers! I've taken his Intro to Computer Science and Programming course on EdX and it was great! All his lectures here on YouTube are great, too! Thank you Professor and MIT!

cryptonetcentralusa
Автор

I'm from Vietnam and live in hanoi but I've never heard about that story. It's really interesting.Thank for your dedicating lecture.

ucanhly
Автор

Thank you Professor! Thank you MIT, I saw many youtube vids to understand recursion but this was the best explaination.

manishahatzade
Автор

I finally found my base case for understanding recursion after searching recursively :)

mouleeswarkothandaraman
Автор

After this Lecture, I understand 2 things, Recursion
and Why MIT is rated 1st in the world in Electrical engineering and computer science

ali
Автор

I have seen many tower of hanoi and recursion videos, this one is just jewel! MIT has awesome teachers for any field! Prof Gilbert strang, John Tsitsiklis etc..

D_Analyst
Автор

pre labeling
​​0:00:00 0:02:31​
0:04:00 What is Recursion
0:05:58 Iterative algorithm so far
0:05:58 Multiplication iterative solution 0:07:56
0:09:49 Factorial
0:12:03 Recursive function scope example
​0:13:46​ Some observation 0:16:07
0:18:03 Example of induction 0:19:44
​​0:23:12 Hanoi tower
0:24:56 ​Recursion with multiple base cases
0:26:14 Fibonacci 0:28:06​
0:30:23 ​Solving recursively
0:33:52 How to store student info 0:35:45 ​0:36:00 ​0:38:00​
0:40:25 Dict v.s. List
0:41:52
Creating a dictionary 0:43:02 ​0:44:16 ​0:45:16
​0:46:25​

flvsedl
Автор

He is utterly crystal clear in what he says. Wow!

shreyapatel
Автор

Thank you teacher! I am grateful for all the efforts you took to prepare all the material for this class.

AnmolKumar-dhlh
Автор

Great teacher but missed a great opportunity to use my favourite computer science joke: In order to understand recursion, one must first understand recursion.

stephenc
Автор

Best explanation of recursion I have watched to date. Thank you sir!

RoguesEver
Автор

If you are having trouble with recursion, don't worry most people have trouble with it--look up explanations from several sources besides this one, and one particular metaphor or walkthrough will eventually give you that a-ha moment where you now intuitively understand it. I didn't think he explained recursion well here, from point of view of someone without a science/math background; it wasn't until I researched it myself and watched videos showing how it worked graphically/metaphorically that I then understood it. TLDR: search of many recursion explained videos on YT, there's tons, and one of them will eventually click!

craigdanielmaceacher
Автор

This teacher was my first intro to python on Edx. He's awesome.

andycalderon