CtCI-6th-Edition
Cracking the Coding Interview 6th Ed. Solutions
Working code solutions for every problem in Cracking the Coding Interview 6th Edition, with the official Java solutions in this repo and community-contributed solutions in companion repos for a dozen other languages.
This repository contains working code solutions for the book "Cracking the Coding Interview, 6th Edition" by Gayle Laakmann McDowell. The book is widely used by people preparing for software engineering job interviews at tech companies, and it covers common programming puzzles involving data structures and algorithms.
The main repository holds Java solutions, which are the same solutions that appear in the printed book. Solutions in other programming languages, contributed by the community, live in separate companion repositories (one per language) that are linked here. Supported languages include Python, JavaScript, C, C++, C#, Go, Kotlin, Swift, Ruby, PHP, Haskell, and several others.
If you want to download everything, cloning with a specific option pulls in all the language repos at once. If you only need the Java solutions, a plain clone is enough.
Contributions are welcome. The workflow is straightforward: fork the appropriate language repo, write your solution, add tests if they apply, and open a pull request with a description of what you did. Java submissions go to this main repo; all other languages go to their dedicated language repo. If you want to add a language that does not yet have a repo, the README explains the steps to propose it and get it adopted under the careercup organization.
The README is sparse beyond setup and contribution instructions; the content is the code itself, organized by the chapters and problems in the book.
Where it fits
- Study the official Java solutions to CTCI problems to understand how to approach common interview algorithm questions.
- Compare your own solution to a specific CTCI problem against the reference implementation to spot gaps in your approach.
- Practice interview problems in your preferred language by cloning the matching companion language repository.