Well, it's taken many months to get to this point, because I had a lot to learn. With no formal computer science training and not knowing the difference between a heap (data structure) and a heap (dynamic memory allocation), it took much longer than I expected to get this far.
Now on to doing programming problems on the whiteboard!
When practicing, write code on a whiteboard or paper, not a computer. Test with some sample inputs. Then test it out on a computer to make sure it actually works.
No whiteboard at home? That makes sense. I'm a weirdo and have a big whiteboard. Instead of a whiteboard, pick up a large drawing pad from an art store. The pen in the photo is for scale. This is my "sofa" whiteboard :)
Before you Start
This book is always recommended in tech interviews because it not only provides a fine review of algorithm topics but also contains an encyclopedia of problems and their solutions (published in papers or used in language libraries).
It's great for problem-solution detection, which is what every programmer needs.
- Algorithm Design Manual (Skiena)
Once you've read and done exercises from the book, read and do exercises from the books below. Then move to coding challenges (further down below).
Handling Programming Interview Problems
When practicing coding problems from a coding interview book, I've found this process works well for me: My Process for Coding Interview (Book) Exercises
Here are some resources on how to do well in the interview. Each of the programming interview books listed down below also gives such advice. This is supplementary.
Then move on:
If you still need to get up to speed with your chosen language:
Exercises for getting better at a given language
Programming Interview Books
I have 5 books of programming interview questions. I know I can't get through all 5. I'll see how long it's going to take based on my progress.
Read second: Cracking the Coding Interview, 6th Edition This book is recommended by many, but is not in Google coaching docs.
Unlock Your Creativity
These 2 are recommended to really change the way you think about programming problems to help unlock your creativity in problem-solving.
One Extra Interview Book
If you have more time, this is also a good one. It's also a good book on problem-solving in general.
Take coding challenges every day, as many as you can.
- Has a nice flow for review/learning of CS concepts and coding problems at each level. Problems are from interviews at multiple large companies.
- Project Euler (math-focused)
And perhaps one of these for mock interviews:
- Gainlo: Mock interview from employees of big companies
- Pramp: Mock interviews from other programmers
The more you prepare and walk through these methods on a whiteboard or paper, and talk through the process as if you're in an interview, the more confident you'll be when your interview comes.
Knowledge conquers fear.