| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This repo contains Python and C++ solutions for Gayle Laakmann McDowell's Cracking the Coding Interview 6th Edition. Admittedly, there are lots of other GitHub repos with solutions for this book. But when you're studying and are deeply confused, how do you know that their code actually works? If it's untested, then you don't! That's why the philosophy of this repo is that every solution must have one or more tests using the Python unittest framework or the C++ Catch framework. We enforce the unit tests using Travis CI automated testing ensuring that the solutions are made of living code that gets executed and tested on every single public commit. Reference and contribute solutions with confidence!
Python and C++ unit tests are in tests.py and tests.cpp respectively. Python and C++ solutions are organized by chapter in python_solutions and in cpp_solutions respectively.
git clone https://github.com/alexhagiopol/cracking-the-coding-interview.git cd cracking-the-coding-interview make configure
In the root directory, execute the following to run all tests in Python and C++:
make test
This will show exactly which lines are not covered by tests in each Python source file:
pip install coverage make test_coverage
The goal of this project is to write a tested Python and C++ solution for every problem in the 6th edition of the textbook. I definitely need help! PRs are of course very welcome. The work has become quite time consuming because each solution is living code that actually gets executed. Thus, each solution needs its own small dataset and infrastructure in order to be tested. Just writing the test for a problem is often harder than solving the problem itself. Here are some ways you can help:
If you have any contributions, please make a PR to the master branch. Feel free to message me for clarification on any of the above items.
Total: 55 / 145
Total: 14 / 151
| Back | FazBrowse Home | New Git URL |