Book Review - Cracking the Coding Interview

ctci

What does every technical interview in the computer industry have in common? That’s right! Data Structure and Algorithms (DSA) problems.

In fact, they’re so common that aspiring computer scientists and software engineers start preparing for them early in their career, while they’re still in college. Several resources help students prepare for these interviews, but few are as popular and effective as the Cracking the Coding Interview book. Disclaimer: I say effective based on the numerous good comments that the book has received throughout the years, as well as from my personal experience.

Although I might reference potential readers as students later on, this book is equally useful for students as it is for experienced candidates. Remember that perfect practice makes perfect, so, like every other skill, technical interviews must be practiced and perfectioned to be highly successful at them.

The book itself is mainly composed of a multitude of DSA problems for practicing, along with hints and solutions for some of them. This might seem unimpressive since you can easily search the web for these kinds of problems, but the importance lies in the first ~8 chapters, which contain the juicy information that every student wants to know. In the following paragraphs, I will briefly touch on what information you can expect to find (spoiler alert: you will probably want to order it as soon as you finish reading this!).

In the Interview Process chapter, common myths and misconceptions about what a coding interview entails are debunked. Most people think that coding interviews are all about solving the algorithm, but they are not! Other important things to look for are the approach taken, the communication skills displayed, logical reasoning, understanding the problem correctly, etc. This is not because you don’t need to solve the algorithm, it’s to help you stay focused on subtler ways of succeeding. There are several more tips available, which give you a different insight into what a technical interview really is.

Then, in the Behind the Scenes chapter, the different processes that some companies take with these interviews are detailed. Depending on your specific situation, this information may not be highly relevant, but taking a deep dive into how top-tech companies conduct their interviews and what are their expectations is sure to give you a tip or two for your future interviews. Even if you are not applying to a specific company discussed here, another company may take a similar approach.

Later, Special Situations are discussed. I especially liked the distinction made between the experienced candidates and “new candidates” (i.e students). The expectations for each one are (unsurprisingly) different, but the real distinction lies in the experience; an experienced candidate is expected to easily talk about an interesting situation that happened to them, discuss potential drawbacks and how they were overcome, and difficult situations (with a project or team) along with how they were solved; whereas a student might just be expected to talk about college projects and an internship (if applicable). Also, the process for startups and acquisitions is mentioned.

DSA problems aside, technical interviews often include another type of question: behavioral questions. These questions are aimed to test your soft skills instead of your technical skills, it is important to note that, for many interviewers, these skills can be more valuable, because from your answers they can form a basic idea of who you are and how it will be like working with you. Even if your technical skills are exceptional, if the interviewers determine you would not be a good cultural fit, unfortunately, you are out of luck.

Up until now, I haven’t mentioned anything related to computer science theory. This book is not meant to teach you computer science, but it contains a very insightful chapter that discusses Big O and the other time/space complexity notations. This concept is very important if you want to be able to design optimal algorithms or solutions, and this works great as a refresher. If you don’t come from a Computer Science background, I recommend you read more about time/space complexity apart from the information in this chapter.

Finally, the most useful things that this book provided for me are the optimization techniques used to design the best possible algorithms. The recommendation is that you start with a simple, brute force implementation and then optimize it. Five different techniques are discussed, each with its pros and cons, and they can be very useful once you get the hang of them and start applying them intuitively.

In the end, this is a great book to help prepare for technical interviews, regardless of skill level or years of experience. I recommend it as a kind of study guide, complementing the exercises found here with popular platforms like Hackerrank or Leetcode as an easier way to practice, and other resources to brush up on fundamental CS concepts like data structures and memory use.

Remember,

Always keep on learning!