Cracking the Coding Interview

It wasn’t Cracking the Coding Interview! (Photo credit: Amazon)

There’s been a lot written about how to prepare for technical interviews, which essentially boils down to three points:

  • Know the common data structures and algorithms well
  • Understand the fundamentals of computer systems and their limitations
  • Practice the above in front of a whiteboard

Even more has been written about how to do the above. People have built businesses and careers around helping job seekers to prepare for such interviews. And I’m personally used quite a few of those resources to help me prepare.

Some of those resources that I’ve personally used are the above book, Interview Cake, LeetCode, HackerRank, and CodeFights.

The thing about all the above, is that either way you’re practicing alone. Most of the problems offered are theoretically interesting, but doing a lot of them gets repetitive really quick. And unless you’ve got really strong willpower, its fairly easy to lose focus once that happens. Or you feel like giving up after hacking at a hard problem for an hour and the online judge keeps saying your test case doesn’t pass due to this weird edge case.

In any case, I used the above to prepare for a phone interview at a very well known company in Mountain View, and then the onsite interview as well. I thought I knew all the data structures and algorithms that were likely to come up in a technical interview nailed, but I was wrong. It was really hard to come up with things on the fly and explain in properly. I already knew I was going to get rejected by the midway point on the onsite.

When I got back to my hotel room after the interview, the first thing I did was to pass out. Being in interview mode for 6 hours is tiring. Then I used one of that company’s services to learn about Pramp, which pairs developers who are trying to practice their interviewing skills to practice being interviewed and interviewing others. I also used that service to learn about, which lets developers practice being interviewed. The way it works is that you fill in some information about your technical background, book a one hour slot to practice, and Pramp matches you to someone with a reasonably similar background (a “peer”) so that you both can take turns interviewing each other. They also send you a question to ask your peer when it’s your turn to be the interviewer.

Well, my first interview at Pramp didn’t go well, but not because the question I was asked was particularly tough. Because I was a new user, Pramp matched me to someone who had used the platform already, and he interviewed me first. I did a decent enough job at answering the question well, and then it was time to switch to me being his interviewer instead. Instead, I stupidly pressed the “end interview” button and terminated the connection permanently. Boy, he must have been pissed. I would be pissed in his place. There was nothing I could do but give him an excellent review, and then contact Pramp to see if they could pass on my apologies to him. I wrote to to explain what happened, and one of the cofounders got back to me. He (1) removed the (bad) review of me, and (2) asked me if there was something with their UI they could improve on to prevent such incidents from occuring. I told them that there wasn’t, because it was my own stupid fault for pressing the wrong button.

Anyway, I continued using Pramp with more success, and many other interview partners. It’s a lot easier to focus and push through a hard problem when there is a real human being there judging you. One of my interview partners even turned out to be a hiring manager from Amazon, and I must have impressed him sufficiently as he later recommended me for an onsite interview at Amazon! So, users of Pramp, treat every interview like its a real one – because it just might be.

Unfortunately they only have about 50 questions in their database, so at some point I ran out of new questions to try on. So I emailed Pramp again to adjust my user settings to allow me to continue practising as I was still preparing for onsites at that time.

Soon afterwards, I got an offer and signed on.