Contents

Now in the 6th edition, Cracking the Coding Interview gives you the interview preparation you need to get the top software developer jobs. This is a deeply technical book and focuses on the software engineering skills to ace your interview. The book is over 700 pages and includes 189 programming interview questions and answers, as well as other advice.

The Interview ProcessThis section offers an overview on questions are selected and how you will be evaluated. What happens when you get a question wrong? When should you start preparing, and how? What language should you use? All these questions and more are answered.

Why?

How Questions are Selected

It's All Relative

Frequently Asked Questions

Behind the ScenesLearn what happens behind the scenes during your interview, how decisions really get made, who you interview with, and what they ask you. Companies covered include Google, Amazon, Palantir, Microsoft, Apple and Facebook.

The Microsoft Interview

The Amazon Interview

The Google Interview

The Apple Interview

The Facebook Interview

The Palantir Interview

Special SituationsThis section explains the process for experience candidates, Program Managers, Dev Managers, Testers / SDETs, and more. Learn what your interviewers are looking for and how much code you need to know.

Experienced Candidates

Testers and SDETs

Program and Product Managers

Dev Leads and Managers

Start-Ups

Acquisitions and Acquihires

For Interviewers

Before the InterviewIn order to ace the interview, you first need to get an interview. This section describes what a software engineer's resume should look like and what you should be doing well before your interview.

Getting the Right Experience

Building a Network

Preparation Map

Behavioral PreparationAlthough most of a software engineering interview will be technical, behavioral questions matter too. This section covers how to prepare for behavioral questions and how to give strong, structured responses.

Interview Preparation Grid

Know Your Technical Projects

Responding to Behavioral Projects

So, tell me about yourself

Big OThis is a critical topic for an interview. In order to optimize your solution, you need to be able to discuss the efficiency of your algorithm.

An Analogy

Time Complexity

Space Complexity

Drop the Constants

Drop the Non-Dominant Terms

Multi-Part Algorithms: Add vs. Multiply

Amortized Time

Log N Runtimes

Recursive Runtimes

Examples and Exercises

Technical Questions (+ 5 Algorithm Approaches)This section covers how to prepare for technical questions (without wasting your time) and teaches actionable ways to solve the trickiest algorithm problems. It also teaches you what exactly "good coding" is when it comes to an interview.

How to Prepare

What You Need To Know

Walking Through a Problem

Optimize & Solve Technique #1: Look for BUD

Optimize & Solve Technique #2: DIY (Do It Yourself)

Optimize & Solve Technique #3: Simplify and Generalize

Optimize & Solve Technique #4: Base Case and Build

Optimize & Solve Technique #5: Data Structure Brainstorm

Best Conceivable Runtime (BCR)

Handling Incorrect Answers

When You’ve Heard a Question Before

The “Perfect” Language for Interviews

What Good Coding Looks Like

Don’t Give Up!

The Offer and Beyond

Handling Offers and Rejection

Evaluating the Offer

Negotiation

On the Job

189 Programming Questions and AnswersThis section forms the bulk of the book. Each section opens with a discussion of the core knowledge and strategies to tackle this type of question, diving into exactly how you break down and solve it. Topics covered include:

Arrays and Strings

Linked Lists

Stacks and Queues

Trees and Graphs

Bit Manipulation

Math and Logic Puzzles

Object-Oriented Design

Recursion and Dynamic Programming

Sorting and Searching

Scalability and Memory Limits

Testing

C and C++

Java

Databases

Threads and Locks

Assorted Moderate Problems

Assorted Hard Problems

For the widest degree of readability, the solutions are almost entirely written with Java (with the exception of C / C++ questions). A link is provided with the book so that you can download, compile, and play with the solutions yourself.

Changes from the Fourth Edition: The fifth edition includes over 200 pages of new content, bringing the book from 300 pages to over 500 pages. Major revisions were done to almost every solution, including a number of alternate solutions added. The introductory chapters were massively expanded, as were the opening of each of the chapters under Technical Questions. In addition, 24 new questions were added.

Cracking the Coding Interview, 6th Edition is the most expansive, detailed guide on how to ace your software development / programming interviews.

WHAT PEOPLE ARE SAYING

"I wish I had read this book 90 days ago. I wouldn't have blown a great job that I really wanted. This book goes beyond the usual answers to questions likely to be asked. Instead of telling you what to think it teaches you HOW to think. If I had read this book first and knew what was coming I think I would have nailed it."

- J. Braun, Amazon.com

"Bought this book 3 weeks before interview. Read the book twice with careful hand-writing practice on each question. Got Amazon offer. The interview had 4 questions and one was in the book."

- Larry, Amazon.com

"This book is a must-have for any interview candidate. Not only does it give practice problems and detailed answers, but it also gives you good advice about how to approach the problems as well as what to expect. I used this book to prepare for my interviews with Microsoft, and Gayle's insight gave me a great idea of how to prepare and how to ace the interview. I recommend this book to anyone who has a coding interview in their future."