A command line tool for memorizing algorithms in Python by typing them. In alpha and things will change.
How it works
- Type out an algorithm based on its function signature and docstring.
- See what you did wrong or get a new algorithm.
- Repeat until bored.
- Clone this repo
- Look at
algorithms/bisect_search.pyand its references.
- Fill out the newly created
worskpace.pyto match the code in
algorithms/bisect_search.py. Do it from memory or look back at
./drill.py practiceagain. You'll do this a lot. Maybe make a shortcut.
- If your code matches, it will be deleted and you can try again. If it's different, you'll get a diff.
- Check out other algorithms that look interesting in
- If you see an algorithm you like, copy-paste its ID to
./drill.py -hto see more features.
- Keep going!
Isn't memorizing bad?
No. Memorization without understanding is bad. You should understand an algorithm well before committing it to memory.
Are these the best versions of these algorithms?
No. They're versions the author likes.
Can I view my history?
Yes! Check out
user_data/history.txt for a nice format. Maybe keep it open in a window for motivation.
Can I add my own algorithms?
./drills.py new_algo --help
Can I see all the algorithms for a specific reference?
Yes! Just two books right now.
./drills.py reference --help