filmov
tv
Getting around the recursion limit

Показать описание
Get rid of recursion with this trick!
Recursion is great, an extremely useful tool to have a mastery of. However, recursion is limited by the depth of the allowed call-stack before an error is caused. Sometimes, depth is not a problem. But other times, it is better to convert your recursive algorithm into an iterative one by manually managing your own stack, which is what we'll see in this Python video.
SUPPORT ME ⭐
---------------------------------------------------
Sign up on Patreon to get your donor role and early access to videos!
Feeling generous but don't have a Patreon? Donate via PayPal! (No sign up needed.)
Want to donate crypto? Check out the rest of my supported donations on my website!
Top patrons and donors: Jameson, Laura M, Dragos C, Vahnekie, Neel R, Matt R, Johan A, Casey G, Mark M, Mutual Information
BE ACTIVE IN MY COMMUNITY 😄
---------------------------------------------------
CHAPTERS
---------------------------------------------------
0:00 Traversing a tree
2:04 The trick
3:41 More complex example with max depth
5:07 Decoupling
Recursion is great, an extremely useful tool to have a mastery of. However, recursion is limited by the depth of the allowed call-stack before an error is caused. Sometimes, depth is not a problem. But other times, it is better to convert your recursive algorithm into an iterative one by manually managing your own stack, which is what we'll see in this Python video.
SUPPORT ME ⭐
---------------------------------------------------
Sign up on Patreon to get your donor role and early access to videos!
Feeling generous but don't have a Patreon? Donate via PayPal! (No sign up needed.)
Want to donate crypto? Check out the rest of my supported donations on my website!
Top patrons and donors: Jameson, Laura M, Dragos C, Vahnekie, Neel R, Matt R, Johan A, Casey G, Mark M, Mutual Information
BE ACTIVE IN MY COMMUNITY 😄
---------------------------------------------------
CHAPTERS
---------------------------------------------------
0:00 Traversing a tree
2:04 The trick
3:41 More complex example with max depth
5:07 Decoupling
Комментарии