1. Generate a problem
leetcode/two_sum/ directory with a complete, testable
scaffold. You can also generate a whole collection at once:
2. Look at what you got
3. Run the tests
The tests fail out of the box becausesolution.py is a TODO stub. That is
the point: red, implement, green.
4. Solve it
Opensolution.py and replace the TODO with your implementation:
5. Rerun the tests
playground.py and
inspect your data structures: trees, linked lists, and graphs all render as
diagrams. See Visualizations.
Working inside this repository
If you cloned the repo for development, the same loop goes throughbake: