Coding Interview Patterns - Nail Your Next Coding Interview
Coding interviews are tough, and they're only getting tougher, typically demanding months of preparation. What we all want is a way to master algorithms and data structures without having to spend countless hours sifting through endless, unfocussed resources. Introducing "Coding Interview Patterns," your complete guide to mastering the key patterns needed to ace your next coding interview.
What’s inside?An insider’s perspective on what interviewers are truly looking for and why.101 real coding interview problems with detailed solutions.Intuitive explanations that guide you through each problem as if you were solving it in a live interview.1000+ diagrams to illustrate key concepts and patterns. Table of Contents Chapter 1: Two Pointers Chapter 2: Hash Maps and Sets Chapter 3: Linked Lists Chapter 4: Fast and Slow Pointers Chapter 5: Sliding Windows Chapter 6: Binary Search Chapter 7: Stacks Chapter 8: Heaps Chapter 9: Intervals Chapter 10: Prefix Sums Chapter 11: Trees Chapter 12: Tries Chapter 13: Graphs Chapter 14: Backtracking Chapter 15: Dynamic Programming Chapter 16: Greedy Chapter 17: Sort and Search Chapter 18: Bit Manipulation Chapter 19: Math and Geometry
A great companion to leetcoding. I recommend pairing this with the Neetcode 150.
This book seemed to try and balance introducing the fundamentals of the basic patterns/topics found in coding interviews and explaining certain aspects deeper. In some coding examples and pattern introductions they found the balance better than others.
Some coding examples felt rushed to get through and therefore missed out on some great opportunities to explain certain aspects deeper.
Overall highly recommend to pair this with actually implementing the code yourself through leetcode or something similar.
(Goodreads for now only lists Alex Xu as an author for this book, which is at least unfortunate for Gunawardane.)
There's no better preparation for coding interviews than going to Leetcode (or similar) and doing problems there. There are lists of recommended problems to do, in increasing difficulty, if one wants to do so.
That said, for some topics, if one doesn't have experience, starting can be quite difficult. Although there are plenty of resources online nowadays (lots of them free), having a guide on how to actually think and develop an understanding of how to solve each problem can be very helpful.
This book is actually very good at doing this. I had already been practicing for a while before it came into my hands and had at least a basic understanding of most of the problems presented, but still found it useful to go over it. Of course, a book such as this one is no use if one doesn't actually practice it (without looking at the book's answers, of course).
The code is in Python, but the algorithms themselves should be usable in any other language (On occasion some Python library is used that makes things easier, sometimes without much explanation, but a quick search online will show equivalents in any language easily).
So, for any programmer/software engineer who is probably going to go through interviews in companies that think this kind of question is a good idea, or for people who enjoy Advent of Code but feel a bit out of their depth, I do recommend this book.
I've tried to learn data structures and algorithms in different ways, such as watching courses, reading legend books, tutorials, and articles, github repos and the outcome was not good. I felt that I needed something else to really understand how I can learn effectively; perhaps after investing in many resources and starting to read this book, I realised that I was able to understand every subject, enjoy doing the exercises and feel that I was not losing time. I want to be honest; this is hard, very hard, so all the practice that I did thanks to this book gave me the confidence to apply to any FAANG interview.
Very good, practical book. The best part are detailed, step-by-step examples of the algorithm application with illustrations. I also liked focusing on the more problematic parts of the given algorithm instead of one-fit-all approach to each algorithm category.