Tests, Questions and Solutions from Cracking the Coding Interview
Switch branches/tags
Nothing to show
Clone or download
Latest commit 0093bbc Mar 11, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src add out of boundary test Mar 11, 2018
.gitignore update readme Dec 7, 2017
README.md update readmeˆ Dec 16, 2017
pom.xml init commitˆ Nov 7, 2017

README.md

Acknowledgement

Credits should go to Gayle Laakmann McDowell for her great work on Cracking the Coding Interview.

Why this repo

Ctci stands out among many interview books by providing not only questions but also incremental hints and solutions. However, Ctci doesn't come with tests. This repo attempts to fill this gap by adding tests for each question.

  • First, writing tests helps to understand the question.
  • Second, we can improve our testing skills
  • Last but not least, tests allow to try out many different solutions.

Get started

This repo includes two git branches:

  • practice: Only tests are provided. It's up to you to find a solution.
  • master: Both tests and solutions are provided. Compare yours with mine.

To get started, please follow the steps below:

  1. Fork this repository

  2. Checkout practice branch to solve problems

  3. Compare with the reference. For instance,you want to check the optimal solution for IsUnique

    git diff master -- src/main/java/arraystring/_01_01_IsUnique.java

  4. Give your feedback! If you find better solutions or tests, we'd love to see your Pull Request.

Keep practicing

Don't worry if you stuck on questions. When it happens, go out for a walk, eat an ice cream or send me a tweet. Come back later when you feel better. The most important thing is that you keep practicing.