FPGARelated.com
Books

Daily Coding Problem: Get exceptionally good at coding interviews by solving one problem every day

Lawrence Wu 2019

Daily Coding Problem contains a wide variety of questions inspired by real programming interviews, with in-depth solutions that clearly take you through each core concept. You'll learn about:


  • Arrays
  • Strings
  • Linked Lists
  • Trees
  • Hash Tables
  • Binary Search Trees
  • Tries
  • Heaps
  • Stacks and Queues
  • Graphs
  • Randomized Algorithms
  • Dynamic Programming
  • Backtracking
  • Bit Manipulation
  • Pathfinding
  • Recursion
  • Data Structure Design
  • System Design
The questions in this book have been chosen with practicality, clarity, and self-improvement in mind. Each one is based on a real question that was asked recently by top tech companies. The problems and explanations were then carefully edited so that each one communicates a key idea that you can apply more generally. Finally, we have organized these problems into chapters by topic, to ensure that you can methodically build up your skills in specific areas.

First, we introduce you to the most essential data structures that pop up in coding interviews, such as linked lists, arrays, strings, and hash tables. For each data structure, we offer a refresher on its advantages and disadvantages, the time and space complexities of its operations, its implementation, and what themes and key words to look for in order to recognize it.

Next, we take a tour through a series of must-know algorithms, including dynamic programming, backtracking, sorting, and searching. At the start of each chapter, we discuss when it is a good idea to use each algorithm, and walk through a simple example to describe step by step how it is performed. We examine patterns one can identify to figure out which algorithm to apply in a given problem, and finally we look at a few specialized algorithms that require combining multiple approaches.

Third, we present a set of more advanced problems that require you to use the preceding data structures and algorithms in novel ways in order to solve real-world applications. From deriving a perfect blackjack strategy to deciphering an alien dictionary, these questions are designed to challenge you and widen your understanding of what can be achieved with the right concepts and implementation.

Lastly, we address the topic of design. It has become increasingly common for candidates to be asked to formulate novel data structures that deal with time and space constraints, or to design a high-level system that meets a particular need. Therefore, our final chapters on data structure and system design walk through each of these question types, respectively, and provide a general strategy for approaching similar problems in the future.