Practice Questions and Resources
Coding Every Day
Interview Cake Crash Course (free!)
Okay, I'm a bit biased here as I've known Parker ever since he first started building Interview Cake years ago — but I honestly think Interview Cake has become far and above the best tool for getting prepared for programming interviews – a no brainer for your active job search interview prep.
What's even better — Parker has now put together a carefully curated free email-based crash course where you learn and practice a little bit each week.
The idea is, the next time you're looking for jobs, you'll be prepared. (Or if you're interviewing soon, you'll have a great overview of what to review.)
General tips
- 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.
- 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.
- Do any memorization or topic reading as the last thing before bed. A study found studying before bed leads to significantly better retention (2011)
- 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:
- Cracking the Coding Interview (start with this)
- Be sure to get the fifth edition, not the fourth. It's worth the money. There are way more practice problems and new sections you don't want to miss out on.
- Elements of Programming Interviews—tons of problems, start with the recommended problem list
- Programming Interviews Exposed
- Algorithm Design Manual
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.
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
- Glassdoor—lots of questions asked in real coding interviews
- LeetCode—sure, it has a silly name, but the problems and explanations are very high quality. Also check out their online judge which supports C++, Java and Python
- Geeks for Geeks
- Career Cup—from the author of Cracking the Coding Interview
- Programming Praxis—solutions in the comments tend to be pretty good
Programming puzzle sites
- Project Euler—classic site with increasingly difficult programming challenges
- Rosalind—great site for python problems
- Blake Embrey's code problems repository on GitHub. Solid repo of practice problems