First… the good
There is a lot of good in Cracking the Coding Interview (CTCI), especially if you’re coming from a nontechnical coding background, or making a career switch into software engineering.
That’s because going through CTCI is almost like going through a condensed ‘greatest hits’ session of undergraduate CS, and is arguably more comprehensive than many algorithm classes you may take in college.
If you haven’t gotten up to speed on most data structures and algorithms, this is a really good primer, with a lot more practice than you would probably get through interview courses.
My positive review ends here, not because I don’t think there is anything else good to say about the resources (there almost undoubtedly is, the 6th edition book is almost 700 pages!), but because it’s the best selling software engineering prep resource out there. Many people, including myself, have used it to prepare for interviews, so it hardly needs someone to sing its’ praises.
My Critique
My critique mainly falls into 4 categories:
- A decent amount of ‘useless’ information
- Not frequently updated enough
- Specialized interviewing isn’t available
- Architecture is pretty bare bones
‘Useless’ Information
There are a decent amount of chapters that are thrown into CTCI that don’t seem particularly relevant for engineering interviews in 2020 and beyond. Namely the ‘Math and Logic Puzzles’, C++ and Java sections. These all feel like afterthoughts and are placed rather randomly in the book.
Furthermore I have never seen any of these concepts tested in an actual live interview with FAANG type companies, larger funded startups or otherwise. These questions seem to focus on a smattering of concepts like primality and probability, but not thoroughly enough to be useful to someone like an actual Data Scientist or AI Researcher, and lord knows when you would get them as a general purpose SWE.
The same goes for these oddly language specific questions UNLESS your role / interview is highly language specific… in which case you likely need an entire other book dedicated to that. Interviewers these days will let you code in any language you’re comfortable in, so it seems strange to dedicate entire chapters to these concepts.
Not Frequently Updated Enough
Unfortunately there isn’t much that can be done about this when it comes to media like CTCI. It’s a book… that needs new editions every so often.
Unfortunately a lot of the content in CTCI needs to be updated frequently to change with the landscape. I mentioned that the book is a good primer, however I’ve noticed a significant uptick in the last few years in the difficulty of problems amongst large tech companies. Frequently companies are now asking ‘hard’ style dynamic programming questions even in technical screens as the bar has been raised. That means that ‘easy’ questions are borderline useless (except to teach a concept for the first time).
Furthermore, because many of the problems are ‘categorized’ (until you get to the moderate and hard sections) you have the initial hint of what the problem subject area is, which can give a false sense of confidence. One of the most important areas of practice is actually categorizing the ‘type’ of problem.
I have seen a bit of a deviation in some companies in terms of the style of interviews they give. While many of the largest companies still adhere to the straightforward white-boarding style interview, I have seen a significant uptick in pair programming / debugging in a codebase style of interview.
It would be great to at the very least touch on these other interview formats.
Specialized Interviewing Isn’t Available
This is the most nitpicky of these sections. CTCI in many ways is obviously aiming to be the one stop shop for ‘generic’ programming interviews. That means that it serves best as a primer and practice for things like Algorithms, Data Structures and the like.
It is curious then, that CTCI contains sections on things like Java and C++ specific knowledge. Most engineering interviews at top companies now let you choose any language of your choice: C++, Java, Javascript, Python… you name it (unless the language in question can’t handle a particular style of question, ie Javascript for multithreading questions).
I find these sections to be almost wholly useless as it should be fairly apparent whether or not this knowledge will be tested… in which case there are far better in depth resources on languages out there than CTCI. These sections of the book would be better filled with additional content (see my next point on architecture) or omitted altogether. Along with the brain teasers and math section they feel like filler.
The solution to this might be to add more specialized sections to CTCI that focused on subject areas (as opposed to language specific questions). We are now living in a time where things like specialized questions for Front End, Mobile and Machine Learning engineers exist. Primers for these subjects would be wholly useful depending on which specialized interview loop you enter into.
In the case of Front End interviews the knowledge of CS concepts is VERY tightly coupled with knowledge of Data Structures as they relate to the DOM, and Javascript language questions. As a result questions found in CTCI very superficially resemble anything you would receive on such an interview.
Similarly an ML interview will have questions on statistics, probability, tuning models, and optimization (math will actually show up during an interview).
I understand that it may be out of scope for this book, but then so are the sections on brain teasers and languages.
Architecture is Pretty Bare Bones
The architecture section of CTCI is… well it just isn’t very good.
All of the superfluous sections mentioned above should be ripped out for a far more thorough review of this section. There is a very low likelihood that studying this section will help you ‘crack’ anything.
In CTCI’s defense: architecture is hard… really hard. A lot of knowledge in this domain is built up through years of experience or by supplementing experience with a deep understanding of systems. However the suggestions here are VERY high level (with only passing mention of something like MapReduce, which would be beneficial to know about on a deep level).
I highly recommend that someone studying for this portion of the interview do their study in 3 main ways:
- Pick up a copy of Designing Data Intensive Applications
- Watch architecture videos of ACTUAL important systems on a place like InfoQ
- Try and design a system (preferably one that has a detailed blog post) and compare… how did you do? Did you think of all the edge cases? Did you make the same tradeoffs? How robust was your system. I’ve found this to be the most illuminating.
- Revisit your own career and think about the systems YOU made and the tradeoffs that were taken