Practice Questions and Resources

Coding Every Day

Coding for Interviews (free!)

Okay, I'm biased, because I run this group. But I honestly think it's the best long-term way of becoming and staying prepared for programming interviews. Each week, the 18,000 Coding for Interviews subscribers receive two things:

  1. A programming interview question
  2. A distilled computer science topic review

You send in your answer and the next week we review solutions.

We practice a little bit each week. The idea is, the next time our group members are looking for jobs, we will be prepared.

New group members are always welcome!

One email each week. No spam. Easy unsubscribe.

Email

General tips

  1. Write your solution on a whiteboard or on a piece of paper first. This will be much more like the real thing, and you can type up and test your code afterwards.
  2. Practice and interview with the language you are most comfortable with. Java, Python, C, C++, C# or Ruby are solid, standard choices. I would only use Javascript, ActionScript and other languages for interviews with companies that use them.
  3. Do any memorization or topic reading as the last thing before bed. A study found studying before bed leads to significantly better retention (2011)
  4. The best preparation is to do real in-person interviews. Interview at a few companies before your target company.

Books (full list)

See the full reading list for books with practice problems. Look for:

And my librarian mother would be upset if I didn't remind you—you can always check your local library for these books. Try before you buy, and force yourself to prepare before the due date!

CodeWars

Especially for phone screens, it's important to exhibit a comfort with coding. I.e., once you come up with the algorithm, showing that you can code it out. CodeWars is a great practice problem website with a ton of excellent "kata", small code challenges and finger exercises. Integrating 10-20 minutes of this in your morning routine will pay dividends in your code fluency in the long term.

Interactive practice problems

Interview Cake

Interview Cake is a novel step-by-step interview problem walkthrough tool that simulates a realistic coding interview, giving you hints and challenging your answers along the way. But I'm biased—I guest-wrote one of the problems!

Hacker Rank

Formerly part of Interview Street's code sprints, Hacker Rank has a nice selection of practice problems. They support over 20 programming languages and have a nice selection of questions for bit manipulation, sorting, string processing, dynamic programming and a handful of math-heavy problems.

CodeEval

CodeEval supports 13 languages and has a selection of programming problems sponsored by individual employers—the sponsors are actually sent a copy of your solution and offered the chance to contact you.

CodeEval has roughly 100 problems of different difficulties, including a solid selection of classic programming interview questions. If you want a set of problems to go through in order, these are well written and very accessible.

TopCoder

TopCoder is an online programming competition which has been around for a long time. For most of TopCoder's problems, you can only use Java, C++ and C#. Some challenges let you use Python.

The TopCoder problem database is practically endless. Start with a TopCoder HS Single Round Match (SRM) or two and then move on to a standard TopCoder SRM. The SRMs can take anywhere between 30 minutes and a couple of hours.

Read the solutions, but be wary of the code style used in these competitions. The hardcore competitors eschew sensical variable naming and instead compress their logic in a way that would make the author of Clean Code shed a tear.

CodingBat (Java / Python only)

CodingBat is a great site for more novice developers to become more comfortable with iteration patterns, string manipulation and more.

The help and videos section has some excellent accessible explanations of some solutions and basic programming techniques.

Practice problem repositories

Programming puzzle sites