Programming ThrowdownPatrick Wheeler and Jason GauciAll episodes
163: Recursion
Episode 163 - Recursion
Intro topic: Electric Cars
News/Links:
- Snake Game in 101 Bytes in a QR Code• https://www.reddit.com/r/programming/comments/15ab4ct/my_qr_code_snake_game_is_now_only_101_bytes/
- Superconductor Rumors abound• https://arstechnica.com/science/2023/08/whats-going-on-with-the-reports-of-a-room-temperature-superconductor/
- OpenWorm• https://github.com/openworm/OpenWorm
- Creator of vim passes away• https://news.itsfoss.com/vim-creator-passed-away/
Book of the Show
- Patrick:• Little Book of Common Sense Investing by Jack Bogle https://amzn.to/43YqANR
- Jason: • Mistborn Saga: https://amzn.to/3DJkUN8
Patreon Plug https://www.patreon.com/programmingthrowdown?ty=h
Tool of the Show
- Jason:• reMarkable https://remarkable.com/
- Patrick: • Stellarium (iOS and Android)
Topic: Recursion
- What is it• Divide-And-Conquer
- Fibonacci numbers
- How to (not) teach recursion
- Practical Applications• Graph operations• Tree retrieval, balancing
- Graph Search
- Spatial partitioning
- Pitfalls• Stack size
- How to solve problems with recursion• (1) Consider the base cases
- (2) Build the recursive step
- (3) Look for ways the recursion will not terminate and fix
- (4) (rest are optional) Remove global contexts
- (5) Add memoization
- (6) Build solutions incrementally