Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Technical Interview Megarepo | 1,379 | 3 years ago | 4 | |||||||
Study materials for SE/CS technical interviews | ||||||||||
Algorithm_study | 502 | 10 days ago | 3 | mit | C++ | |||||
This repository consists of materials for those preparing for coding tests and algorithm interviews. | ||||||||||
Cracking The Coding Interview | 495 | a year ago | 2 | bsd-3-clause | C++ | |||||
:books: C++ and Python solutions with automated tests for Cracking the Coding Interview 6th Edition. | ||||||||||
Cracking The Coding Interview | 91 | 2 years ago | 3 | Java | ||||||
Tests, Questions and Solutions from Cracking the Coding Interview | ||||||||||
Kotlininterviewquestions | 82 | a month ago | Kotlin | |||||||
Covers both theory questions and challenging code | ||||||||||
Code_problems | 54 | 21 days ago | 68 | mit | C++ | |||||
Code Problems from Coding Challenge Websites. The goal is to help them to improve their code skills and also studying for coding interviews. | ||||||||||
Interviewtest | 44 | 6 years ago | 1 | Java | ||||||
Skeleton Project for an Android Technical Interview Test | ||||||||||
Epi Js | 43 | 2 years ago | 6 | JavaScript | ||||||
Solutions for the book "Elements of Programming Interviews", written in JS and TS. | ||||||||||
Python Developer Roadmap | 38 | 8 months ago | mit | Python | ||||||
Roadmap for becoming Python developer. | ||||||||||
Ctci 6th Edition Ruby | 31 | 4 years ago | 2 | Ruby | ||||||
Cracking the Coding Interview 6th Ed. Solutions (Ruby) |
This repo contains C++ and Python solutions for Gayle Laakmann McDowell's Cracking the Coding Interview 6th Edition. Admittedly, there are other GitHub repositories with solutions for this book. But how do you know that their code is actually correct? If it's untested, then you don't!
In this project, every C++ solution has unit tests using the C++ Catch framework, and every Python solution has unit tests using the Python unittest framework. We enforce test correctness automatically using continuous integration servers ensuring that the solutions are made of living code that gets executed and tested on every single commit. To my knowledge, this is the Internet's only solutions repository with this level of testing rigor: >90% automated test coverage means you can reference and contribute solutions with confidence.
9 / 9
complete.8 / 8
complete.4 / 6
complete.11 / 12
complete.7 / 8
complete.0 / 10
complete.0 / 12
complete.8 / 14
complete.0 / 8
complete.10 / 11
complete.0 / 6
complete.10 / 11
0 / 7
complete.0 / 4
complete.11 / 26
complete.1 / 26
complete.2
complete.C++ Total: 81
solutions complete.
9 / 9
complete.8 / 8
complete.6 / 6
complete.11 / 12
complete.7 / 8
complete.0 / 10
complete.0 / 12
complete.11 / 14
complete.0 / 8
complete.1 / 11
complete.0 / 6
complete.0 / 7
complete.2 / 26
complete.3 / 26
complete.Python Total: 58
solutions complete.
139
unique solutions complete.Mac usage requires installing the package managers Homebrew and Pip which is done for you in the Makefile:
git clone https://github.com/alexhagiopol/cracking-the-coding-interview.git ctci
cd ctci
make configure-mac
git clone https://github.com/alexhagiopol/cracking-the-coding-interview.git
cd ctci
make configure-ubuntu
For Windows users, I recommend developing this project using the Windows Subsystem
for Linux (WSL) feature
of Windows 10 and then following the Ubuntu build and testing instructions inside WSL.
This recommendation is due to the use of Ubuntu, CMake, and makefile based build and execution
systems on the servers that automatically test changes to the code. For more on Windows
development, see the Appendix
section at the end of this page.
Testing is the most important part of this project: only the unit tests define the problem being solved. In the root directory, execute the following to run all tests in Python and C++:
make test
make test
is the command I use most while developing this project. My workflow follows:
make test
to see where the project fails to satisfy the unit tests.make test
succeeds.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, so PRs are welcome. There is much to do because each solution needs its own small dataset and infrastructure in order to be tested. 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.
On my own Windows machine, I develop using CLion running
natively in Windows and test the code using make test
in a WSL terminal window.
For users who do not want to use WSL, I have developed the build and test methodology below:
The project can be developed purely on Windows without WSL by using Visual Studio 2017. First clone the code:
git clone https://github.com/alexhagiopol/cracking-the-coding-interview.git
cd ctci
git submodule update --init
Then, install Python3 and numpy using your method of choice. I prefer installing Python3 and pip3 from the official website then installing numpy via pip:
pip install numpy
Then, open the project in Visual Studio 2017 which has CMake support. I've found that best the workflow is to use Visual Studio to edit code and use debugging functionality. Before building the code, you must follow these instructions to tell Visual Studio to download PDBs it needs. Additionally, this article describes Visual Studio CMake support in more detail if you're interested. A CMakeSettings.json file in the root project directory sets the location of the Visual Studio build folder to be inside the root folder of the project.
Running the tests and seeing their output is best done from a PowerShell window since VisualStudio in CMake mode
does not allow the console output of the tests.exe
and tests.py
files to remain visible even when pressing
CTRL + F5 as described in this post which applies to
"normal" Visual Studio use. I am monitoring the situation re: Visual Studio, and when I find better solutions
I will implement them or post them. If you know of something better, please contact me.
In the meantime, from the project root directory, you can run the Python tests using ...
python tests.py
... and you can run the C++ tests using ...
.\build\x64-Debug\tests.exe