Lets practice some
Don't worry if it isn't immediately clear how to solve them, work through different ideas and write some code! It's okay to work through a 'naive' solve first and then move on to applying a hash table to optimize your solution.
- Fork and clone this repo, and cd into python-recursion-challenges
- each challenge is in a
.py
file so you can work on them one at time and use the commandpython <filename>.py
to check your work
When first considering how to write a recursive function first consider:
- What is the base case, that is what is the condition that stop to recursion
- What is the recursive case(logic), ie what is the chunk of code that needs to run each time the function recurses
- All content is licensed under a CC-BY-NC-SA 4.0 license.
- All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact legal@ga.co.