Shop Viral Tech & Accessories
Buy New
To see product details, add this item to your cart.
Ships from: Amazon.com
Sold by: Amazon.com
To see product details, add this item to your cart. You can always remove it later.
Shipper / Seller
Amazon.com
Amazon.com
Shipper / Seller
Amazon.com
Returns
30-day refund / replacement
30-day refund / replacement
This item can be returned in its original condition for a full refund or replacement within 30 days of receipt.
Read full return policy
Gift options
Available at checkout
Available at checkout This item is a gift. Change
At checkout, you can add a custom message, a gift receipt for easy returns and have the item gift-wrapped
Payment
Secure transaction
Your transaction is secure
We work hard to protect your security and privacy. Our payment security system encrypts your information during transmission. We don’t share your credit card details with third-party sellers, and we don’t sell your information to others. Learn more
To see product details, add this item to your cart. You can always remove it later.
Access codes and supplements are not guaranteed with used items.
Ships from and sold by Seattlegoodwill.
Added to

Sorry, there was a problem.

There was an error retrieving your Wish Lists. Please try again.

Sorry, there was a problem.

List unavailable.
Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera - scan the code below and download the Kindle app.

QR code to download the Kindle App

  • Cracking the Coding Interview: 189 Programming Questions and Solutions

Follow the author

Get new release updates & improved recommendations
Something went wrong. Please try your request again later.

Cracking the Coding Interview: 189 Programming Questions and Solutions 6th Edition

4.7 out of 5 stars (9,666)

Purchase options and add-ons

I am not a recruiter. I am a software engineer. And as such, I know what it's like to be asked to whip up brilliant algorithms on the spot and then write flawless code on a whiteboard. I've been through this as a candidate and as an interviewer.

Cracking the Coding Interview, 6th Edition is here to help you through this process, teaching you what you need to know and enabling you to perform at your very best. I've coached and interviewed hundreds of software engineers. The result is this book.

Learn how to uncover the hints and hidden details in a question, discover how to break down a problem into manageable chunks, develop techniques to unstick yourself when stuck, learn (or re-learn) core computer science concepts, and practice on 189 interview questions and solutions.

These interview questions are real; they are not pulled out of computer science textbooks. They reflect what's truly being asked at the top companies, so that you can be as prepared as possible.
WHAT'S INSIDE?

  • 189 programming interview questions, ranging from the basics to the trickiest algorithm problems.
  • A walk-through of how to derive each solution, so that you can learn how to get there yourself.
  • Hints on how to solve each of the 189 questions, just like what you would get in a real interview.
  • Five proven strategies to tackle algorithm questions, so that you can solve questions you haven't seen.
  • Extensive coverage of essential topics, such as big O time, data structures, and core algorithms.
  • A behind the scenes look at how top companies like Google and Facebook hire developers.
  • Techniques to prepare for and ace the soft side of the interview: behavioral questions.
  • For interviewers and companies: details on what makes a good interview question and hiring process.

Illustrations noteIllustrations: Illustrations, black and white

Books with Buzz
Discover the latest buzz-worthy books, from mysteries and romance to humor and nonfiction. Explore more

Frequently bought together

This item: Cracking the Coding Interview: 189 Programming Questions and Solutions
$23.38
Get it as soon as Sunday, Jun 14
Sold by Union Station Store and ships from Amazon Fulfillment.
+
$39.99
Get it as soon as Wednesday, Jun 3
In Stock
Ships from and sold by Amazon.com.
Total price: $00
To see our price, add these items to your cart.
Details
Added to Cart
Some of these items ship sooner than the others.
Choose items to buy together.

Customers also bought or read

Loading...

Editorial Reviews

About the Author

Gayle Laakmann McDowell is the founder and CEO of CareerCup and the author of Cracking the PM Interview and Cracking the Tech Career.

Her background is in software development. She has worked as a software engineer at Google, Microsoft, and Apple. At Google, she interviewed hundreds of software engineers and evaluated thousands of hiring packets on the hiring committee. She holds a B.S.E. and M.S.E. in computer science from the University of Pennsylvania and an MBA from the Wharton School.

She now consults with tech companies to improve their hiring process and with startups to prepare them for acquisition interviews.

Product details

  • ASIN ‏ : ‎ 0984782850
  • Publisher ‏ : ‎ CareerCup
  • Publication date ‏ : ‎ July 1, 2015
  • Edition ‏ : ‎ 6th
  • Language ‏ : ‎ English
  • Print length ‏ : ‎ 687 pages
  • ISBN-10 ‏ : ‎ 0984782869
  • ISBN-13 ‏ : ‎ 978-0984782857
  • Item Weight ‏ : ‎ 2.75 pounds
  • Dimensions ‏ : ‎ 7 x 1.59 x 10 inches
  • Part of series ‏ : ‎ Cracking the Interview & Career
  • Best Sellers Rank: #14,859 in Books (See Top 100 in Books)
  • Customer Reviews:
    4.7 out of 5 stars (9,666)

About the author

Follow authors to get new release updates, plus improved recommendations.
Gayle Laakmann McDowell
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

Gayle Laakmann McDowell is an author, consultant, and founder focusing on improving tech hiring for both the interviewer and the candidate.

Gayle has worked as an engineer for Google, Microsoft, and Apple. Most recently, at Google, she served on the hiring committee where she interviewed hundreds of candidates and evaluated thousands more. It was here that she discovered the disconnect between candidates, their skill set, and their interview performance.

Though her company, CareerCup, Gayle has worked with many of the top tech companies to reform their hiring practices and implement interviewer training programs.

She is the author and creator the best-selling Cracking the Interview & Career series: Cracking the Coding Interview, Cracking the PM Interview (co-authored with Jackie Bavaro), Cracking the PM Career (co-authored with Jackie Bavaro), and Cracking the Tech Career

Gayle holds a bachelor's and master's in Computer Science from the University of Pennsylvania and an MBA from the Wharton School of Business.

She currently consults, writes, and codes from her home in Palo Alto, California. She can be found online at gayle.com, twitter (@gayle), and facebook (@gayle).

Customer reviews

4.7 out of 5 stars
9,666 global ratings

Customers say

Customers find this book excellent for interview preparation, particularly for software engineers entering the field, and appreciate its detailed explanations of advanced topics and useful information on algorithms. Moreover, the book is well-suited for beginners, and customers consider it worth the money. However, customers disagree on its readability, with some finding it user-friendly while others say it's difficult to follow.
AI Generated from the text of customer reviews

Select to learn more

346 customers mention content, 328 positive, 18 negative
Customers praise the book's content, describing it as fantastic and of good quality, with one customer noting it's particularly suitable for beginners.
...Other than that great book. I passed my previous interviews with this book. Some questions are represented in a way how a live interviewer would ask....Read more
I’m sure this is a good book. However, you would think a book on software would have what language it is focused on readily available. It does not....Read more
Excellent book. Extremely thorough and detailed, but you can also apply one chapter at a time....Read more
Nice book helped me a lot in understand what industry seeks in skills that helped me understand us IT industry.Read more
166 customers mention interview preparation, 160 positive, 6 negative
Customers find this book to be an excellent guide to interview preparation, containing valuable insights into the interview process and being incredibly useful for practicing coding questions. They consider it a must-have for software engineers entering the field.
This a great book for interview preparationRead more
Great interview prep! Covers exactly what you need to know.Read more
Perfect book for interview.Read more
This book is ideal for coding interviews / online judge sessions. Quickly helped recap Computation Thinking knowledge with clear examples.Read more
140 customers mention detailed, 125 positive, 15 negative
Customers find the book detailed and comprehensive, with advanced topics that provide thorough explanations and include helpful hints for every question. They appreciate how it covers algorithms and helps understand the purpose of using data structures.
Very detailed and encyclopedic coverage of programming tasks. It would take months to work through them all....Read more
...Very practical and to the point, and very usable and readable for young adults and college students....Read more
Good book that has a wealth of knowledge to keep you up to speedRead more
...Very good introduction to the process of software engineering interview process.Read more
123 customers mention usefulness, 118 positive, 5 negative
Customers find the book very helpful and educational, noting that it provides useful advice and teaches various techniques. One customer mentions it serves as a great way to prep on all of the various topics.
Really helpful references and guides. Very useful, even after you land your first roleRead more
Indepth and useful for someone who is trying to learn the ways of interviewing. The book is almost as new- no complaints!Read more
...Overall, I think this a very helpful book. I would recommend you begin reading this book immediately after your first course on Algorithms....Read more
The content of this book are beyond great, great explanation and exercises....Read more
55 customers mention suitability for beginners, 52 positive, 3 negative
Customers find the book suitable for beginners and recommend it for all levels of programmers, with one customer noting it's really to the point.
...to much to say, just that if you want to start studying it is a good book to startRead more
Difficulty level-Intermediate. Best for beginners.Read more
Has a lot of different types of interview questions. Great book for getting the practice and prep for technical coding interviews.Read more
Good book for coding enthusiasts.Read more
52 customers mention value for money, 44 positive, 8 negative
Customers find the book well worth their money, with one customer noting it's worth the effort to work through it, and another mentioning it's worth the upgrade from the 5th edition.
This is great for preparing for technical interviews! Must have. Worth every penny.Read more
...It's really huge and has a lot of exercises. It a good investment.Read more
great for the price! worked well....Read more
The quality and price is good.Read more
70 customers mention readability, 47 positive, 23 negative
Customers have mixed opinions about the book's readability, with some finding it understandable and user-friendly, while others report it is difficult to follow.
It is a really good book, very well organized and easy to read. The writer is a genius!...Read more
...It is well-written, interesting and brilliant! This is really a must-have book for every developer!Read more
This book is very hard to follow. The author does a terrible job explaining the technical topics and does not provide useful insights.Read more
...CS fundamentals this books offers a refresher course and easy to follow examples.Read more
27 customers mention effectiveness, 16 positive, 11 negative
Customers have mixed opinions about the book's effectiveness, with some finding it perfect for their needs while others describe it as useless.
great for the price! worked well....Read more
...zero java experience and you only know Python, unfortunately, this book is useless. All the talking points and examples are on java....Read more
...Just a warning, this is a problem solving book. If you not interested in trying the problems you will not like this book.Read more
...Useless.Read more
Good quality
5 out of 5 stars
Good quality
Better than I expected. Thank you
Thank you for your feedback
Sorry, there was an error
Sorry we couldn't load the review

Top reviews from the United States

  • 5 out of 5 stars
    It's a great book
    Reviewed in the United States on September 20, 2016
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    While this book is meant for interview practice, I would recommend you still read it just for fun if you're into algorithms.

    I've always believed that there's no "crack" to coding interviews; it's just a matter of whether you can code or not (well, at least at those sane companies not filling up school buses with golf balls). And that requires practice. Lots of practice. Which is why I spent all my free time working out problems on Hackerrank. For me, this went well . . . for a while.

    But there comes a point at which you get stuck. I remember working on some hackerrank problems in the medium to hard difficulty which I would not be able to proceed for weeks and weeks. No amount of googling for information, discussion boards or stack overflow threads paint a complete picture to help you when you're stuck.

    After countless such occasions and failing a few interviews, I gave in and bought this book. After all it was $20 - the cost of an uber to work.

    Now, I wish I had bought this sooner!

    Within reading the first two chapters I've already learnt so much about how to think about coding problems. There's also a nice collections of custom data structures at the end of the book. I've swiped some data structures straight out of this book and use them in my day-to-day life too.

    Gayle has done a tremendous job of using words to explain how that weird gooey gel inside your head moves like when problem-solving. She deconstructs every approach to tackle a problem into atomic pieces. She goes into great depth about alternative designs, tradeoffs and runtime complexity. She talks about visualizing recursive calls as trees, thinking about BUD*, amortized analysis of ArrayList and much more. The great thing is that Gayle goes into copious amounts of details for each solution - she talks about how to start from a brute force solutions and optimize each component one-by-one and talks about tradeoffs in approaches.

    Overall, I think this a very helpful book. I would recommend you begin reading this book immediately after your first course on Algorithms. It will certainly help drill down the concepts and help strengthen your fundamentals.

    *BUD is a special term the author uses to describe strategies to optimize solutions

    29 people found this helpful
    Sending feedback...
    Thank you for your feedback.
    Sending feedback...
    Thanks, we'll investigate in the next few days.
  • 5 out of 5 stars
    A great interview preparation book, made even better with this edition.
    Reviewed in the United States on July 9, 2015
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    Since the first edition, I've recommended Cracking the Coding Interview to people preparing for technical interviews. Gayle has a depth and breadth of knowledge that she shares freely in this book. She means what she says too: she's not a recruiter, or a sourcer, or affiliated with any of those groups -- she's an engineer who knows what it takes to be prepared for and ace a technical job interview.

    Full disclaimer: I worked with Gayle at Google, and I know her -- and back in the day I even saw her code. Forearmed with this additional information on how she works, I can say that she really knows her stuff here.

    There's a reason why multiple companies recommend this book to prospective candidates to prepare. It's not a cookbook, you can't just learn the examples rote and then ace an interview. For one thing: hiring managers like me know about the book, and we're not going to let our teams ask exactly these questions. However, by working through the examples in the book, you will gain an understanding and refresh your software engineering knowledge to a level where any algorithm, design or coding question that is thrown at you will be answerable.

    By following and solving the examples in this book, you'll refresh your memory on how to approach these problems. You'll make mistakes, and be more comfortable with making those mistakes and then moving past them. You'll get some insight into how you approach problems and potential pitfalls in your methodology. There are incredibly useful tips on how to describe your solutions, how to work through a coding question, and how to answer some more thorny behavioral questions.

    The 6th edition, with its additional 50+ questions, expanded solutions and explanations of the tech hiring process will put you in a good position to do your best in your job interview. As a hiring manager, I want you to do your best. The better you are prepared, the less nervous you'll be when you interview, and the better you'll perform. This book is an indispensable part of your interview preparation.

    9 people found this helpful
    Sending feedback...
    Thank you for your feedback.
    Sending feedback...
    Thanks, we'll investigate in the next few days.
  • 5 out of 5 stars
    best book for SW engineer
    Reviewed in the United States on April 13, 2026
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    amazing book , helped me to get a job as a software engineer

    Sending feedback...
    Thank you for your feedback.
    Sending feedback...
    Thanks, we'll investigate in the next few days.
  • 4 out of 5 stars
    Nestor Martourez
    Reviewed in the United States on December 3, 2025
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.
    Sending feedback...
    Thank you for your feedback.
    Sending feedback...
    Thanks, we'll investigate in the next few days.
  • 5 out of 5 stars
    Best book purchase I have ever made, unreservedly
    Reviewed in the United States on June 21, 2017
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    Best book I ever bought. I'm fairly certain the interview preparation guide and sample coding questions gave me the edge I needed to get through a recent, grueling coding interview emerging to be described by my recruiter and the clients as the "best candidate they'd seen in weeks".

    I was inspired to buy the book and learn from it after having made it all the way to the final phase of a long multi-test interview process with another company. What I lacked was the ability to resist the urge to panic and the confidence to do what I needed to succeed in a time-pressured whiteboard question. Although my portfolio was great and my personality evaluations very positive, with my terrible whiteboard performance I left those fine people with the impression I didn't know my head from my you know what.

    I found that the book's instructions were very helpful in providing a blueprint in how to slow down and think methodically and as a result I'm not just better at interviews, but a better coder overall I believe. By no means am I finished absorbing all the wisdom from this book, but I've already reaped immeasurable reward from just one short dedicated week studying it.

    Finally, while certainly this book cannot take you from 0 to 60 or replace a lack of portfolio, it will help polish experienced coders, especially the self-taught, maybe who need a little help communicating their ideas or tackling the kind of problems that are current interview fodder, which as we all know can be quite alien from the comfort zones of our specialties. Although, pure beginners may also get some value out of this as a learning checklist for being able to do the minimum of what the industry now expects developers to know well.

    Just buy the book!

    5 people found this helpful
    Sending feedback...
    Thank you for your feedback.
    Sending feedback...
    Thanks, we'll investigate in the next few days.
  • 5 out of 5 stars
    Good quality
    Reviewed in the United States on May 6, 2026
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    Better than I expected. Thank you

    Good quality
    Good quality
    Good quality
    Good quality
    Good quality
    5 out of 5 stars
    Good quality
    Reviewed in the United States on May 6, 2026

    Better than I expected. Thank you

    Sending feedback...
    Thank you for your feedback.
    Sending feedback...
    Thanks, we'll investigate in the next few days.
  • 5 out of 5 stars
    Great Test Of Knowledge For Computer Scientists
    Reviewed in the United States on September 23, 2016
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    Cracking the Coding Interview contains tons of problems for solving with full coded solutions in the back of the book. The focus is on the problems themselves and techniques for solving interview questions.

    There is still about 100 pages at the beginning about how companies work and what to do at an interview. This applies mostly to companies in Silicon Valley and primarly at major tech companies such as Google.

    What make the problems so interesting is that there are many different solutions to the same problem. Some of the times I thought I had an optimal solution, and looked at the answer to find out there were a couple better solutions. Other times I would have a solution that was not listed but was of the same running time. Many times I was not able to get the answer and these problems will be difficult for even the most experienced computer scientist.

    The material covers basically what a good university program should teach you. It focuses on algorithm knowledge, although there are chapters with problems about OOP, and the Java language. Most of the solutions are programmed in Java given in the back.

    A lot of thought was put in how to structure this book. There are hints for each problem. This is used to simulate the interview environment where if you got stuck you should ask questions and hopefully the interviewer will give you a hint. The hints are not near the answers section so you are not tempted to glance at the answer first.

    Just a warning, this is a problem solving book. If you not interested in trying the problems you will not like this book.

    2 people found this helpful
    Sending feedback...
    Thank you for your feedback.
    Sending feedback...
    Thanks, we'll investigate in the next few days.
  • 5 out of 5 stars
    I was never a smart student in the classroom
    Reviewed in the United States on November 9, 2017
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    I was never a smart student in the classroom. However, I was lucky to get selected to the best Engineering college in the country, where only top 300 maths stream students from the whole country yearly get selected to the national University Program. I passed out in 2006, but was not selected to the CSE program, because only the smarted 50 was chosen. Since then I never thought I will ever learn programming, or I could never work in the lucrative Software Field. However later after the Uni, I developed an interest in learning Programming for my Living, and since then I kept learning ever since, failing at some places, never giving up, growing up with some confidence...But was a tough Journey. Trying many courses, working every day after hours, for 11 years continuously working hard generally more than 12 hours at average on this field, and Have read, and followed a lot of books, nothing truly makes me confident. I realized, somewhere I have missed some fundamentals, some patterns of thinking, which kept me scared and unconfident, keeping a doubt about my fundamental expertise, in a far unrecognize place of my heart.

    Recently I got an interview call to work as a Google Contractor, which really impressed me. Again I found out, getting my self-prepared for such a challenge, I am not yet ready. I was feeling, I am missing some way of thinking. I got an Amazon interview. One of my friends recommend me this book, But by that I have already read, enough about the feedback for the book. I have my second interview for Amazon today, in other few hours. I am still not confident about Programming because I could not stay enough with the Book. However, I already have the feeling that this book is the most enlightening book, if you are like me, not very confident, not very super smart and still are planning to crack a coding interview with some smart answers. The book has extraordinarily smart real-world example solutions to some well-known/well-unknown interview questions, without which an average ordinary hardworking brain like of mine (not a college superstar nerd), could not imagine alone. Thank you, Gayle Laakmann McDowell. She is a Genious.

    16 people found this helpful
    Sending feedback...
    Thank you for your feedback.
    Sending feedback...
    Thanks, we'll investigate in the next few days.

Top reviews from other countries

    Translated by Amazon
    See original
  • 5 out of 5 stars
    Livro muito bom, mas fui taxado
    Reviewed in Brazil on October 2, 2025
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    Livro excelente.

    Sending feedback...
    Thanks, we'll investigate in the next few days.
    Translated from Portuguese by Amazon
    See original
  • 5 out of 5 stars
    Book
    Reviewed in India on April 19, 2026
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    Good book if you are preparing for placements

    Sending feedback...
    Thanks, we'll investigate in the next few days.
  • 5 out of 5 stars
    iyi paketleme güzel ürün
    Reviewed in Turkey on May 26, 2025
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    iyi paketleme güzel ürün

    Sending feedback...
    Thanks, we'll investigate in the next few days.
    Translated from Turkish by Amazon
    See original
  • 5 out of 5 stars
    Amazing book and the code is very readable
    Reviewed in Mexico on May 19, 2024
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    The perfect choice to land your next programming job, all the text, diagrams and code printed are readable and very easy to follow.

    Sending feedback...
    Thanks, we'll investigate in the next few days.
  • 5 out of 5 stars
    Changed the way I looked at a lot of problems
    Reviewed in Canada on October 3, 2016
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    This is a really good book. It has a lot of really good problems, amazing career advice, and just a lot of worthwhile content for the price. My favourite thing about this book is how it explains how you should get in the habit of being able to do the same problem different ways or look at it at a different angle. Sure, you might be able to write a one line hack that solves a problem quickly and very efficiently, but what if you had to solve it another way, using a much more unconventional approach?

    Personally I'm working towards being a sysadmin/database admin and programming isn't the main focus of my education but the more I use it the more I can see it being a required skill for employment as I approach my now graduating year. Also this book has motivated me to learn Java much better.

    Anyway aside from all the great programming advice, it also offers some really nice insights into the hiring process of very high end tech companies and also things you should do to improve your chance of being hired.. and I can tell you it doesn't always come down to how well you can solve complex problems.

    Sending feedback...
    Thanks, we'll investigate in the next few days.