Have one to sell?
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See all 2 images

Cracking the Coding Interview, Fourth Edition Paperback – Oct 15 2008

See all 2 formats and editions Hide other formats and editions
Amazon Price
New from Used from
"Please retry"
CDN$ 186.13 CDN$ 65.92

There is a newer edition of this item:

Harry Potter and the Cursed Child
click to open popover

No Kindle device required. Download one of the Free Kindle apps to start reading Kindle books on your smartphone, tablet, and computer.
Getting the download link through email is temporarily not available. Please check back later.

  • Apple
  • Android
  • Windows Phone
  • Android

To get the free app, enter your mobile phone number.

Product Details

  • Paperback: 310 pages
  • Publisher: Createspace; 4 edition (Oct. 15 2008)
  • Language: English
  • ISBN-10: 145157827X
  • ISBN-13: 978-1451578270
  • Product Dimensions: 15.2 x 1.8 x 22.9 cm
  • Shipping Weight: 431 g
  • Average Customer Review: Be the first to review this item
  • Amazon Bestsellers Rank: #649,687 in Books (See Top 100 in Books)
  •  Would you like to update product info, give feedback on images, or tell us about a lower price?

What Other Items Do Customers Buy After Viewing This Item?

Customer Reviews

There are no customer reviews yet on Amazon.ca
5 star
4 star
3 star
2 star
1 star

Most Helpful Customer Reviews on Amazon.com (beta)

Amazon.com: HASH(0x9c18a714) out of 5 stars 46 reviews
58 of 62 people found the following review helpful
HASH(0x9e0177e8) out of 5 stars Nice collection of problems, but unpolished and full of errors, lacks explanation. Feb. 20 2011
By RRS - Published on Amazon.com
Format: Paperback Verified Purchase
I'm a software engineer at a billion-dollar company, with about 10 years of experience after college. I decided to interview at a promising early-stage startup and thus bought two interview books (this one and Programming Interview Exposed) to brush up on things and get back that interviewing magic. (I had been at my last job for over 5 years, so it has been a while.)

This book is good in some ways. The best thing about it is the set of problems in it. It's quite comprehensive: every area I could think of is covered. Even the knowledge-based chapters (e.g., on threading, or networking, or low-level programming) are surprisingly up-to-date and representative of the type of stuff that is asked. So if you want to get a big list of problems and at least a good stab at the solutions (if you're stuck), it's much better to get this book (as opposed to looking for problems on the Internet).

So why only two stars? The biggest issue is that there are tons of errors in this book. I can't tell you how many, but I know I personally found at least 5. Some are trivial -- the book may say something is O(n) space, when it's O(1) space. Some are egregious -- the smart pointer implementation, which is compressed to one page in the solution section, is utterly broken. (For example, operator=() fails to give up ownership of what it points to before the assignment, before taking ownership of the new object. That is a completely wrong solution to the problem! What if an inexperienced reader reads this section and becomes confused?) Books like this should not have mistakes, especially not a 4th edition.

Sometimes the problem isn't clearly stated, so that trying to solve it is very difficult without more explanation. Flipping to the solution reveals what the problem was, but then what was the point?

In general, when reading this book, once gets the sense that it was thrown together. It seems like it wasn't edited in the most basic ways; for example, URLs are referred to as "urls" all over the text. That doesn't really matter, of course, but it is indicative of the type of publication it is. It's like someone wrote up an elaborate text file and then basically just sent it off to be published. Very cheap and kind of unprofessional.

Finally, the book's solutions (while usually 100% correct) typically don't try to explain and expose the thinking process behind a solution. True, sometimes it's quite obvious, so there's no point. But sometimes, it's not obvious -- it would be helpful to a potential interviewee to get a glimpse into HOW to get to the solution, instead of basically just being given the solution. This isn't always the case in the book, but most of the time it is.

So, there you go. If you want a nice collection of problems that's representative and up-to-date, this is your book; but don't expect an error-free and carefully edited or explained work.
35 of 36 people found the following review helpful
HASH(0x9cd14264) out of 5 stars Practice makes perfect May 10 2010
By Lei Gong - Published on Amazon.com
Format: Paperback
My background: worked as a software developer for 5 years before changing companies and I needed to freshen up my interview skills. Having conducted dev interviews before, I wanted to be as prepared as possible.

I used this book as a practice guide for my interviews with Microsoft, Amazon, and Google. Got offered to two of the companies through practicing the questions in this book over and over again. I was only caught off guard by one or two questions during my interviews through at least 15 interview loops. Most of the interview questions at the above companies follow the same two dozen or so coding patterns and the questions in this book thoroughly covers them. Learn the coding patterns from this book and you won't be surprised or nervous during your loops. I tried not to act too surprised when 1/5 of the questions from my interviews were straight from the book.
24 of 24 people found the following review helpful
HASH(0x9c531bdc) out of 5 stars "Cracking" vs "Programming interviews exposed" May 12 2011
By Margaret Gilligan - Published on Amazon.com
Format: Paperback
"Cracking the coding interview" (4th ed, 2008) by Gayle Laakman is a
good book, but so is the very similar book "Programming Interviews
Exposed: Secrets to Landing Your Next Job" (2nd edn), John Mongan,
Noah Suojanen and Eric Giguère (2nd edn, 2007) . Which should you
choose? Here are the main differences:

- "Exposed" is much more readable: it explains the solutions in
English before giving code, whereas "Cracking" often just presents
code with minimal explanation. Another nice thing is that "Exposed"
presents the solution in stages, so you can read the first part of the
solution to get a hint, and then try again. By contrast, "Cracking"
just gives the key idea right away, so even a "peek" at the solutions
means it's game over (modulo coding issues, which are usually easy).

- "Cracking" has more questions, and they generally seem to be a bit
harder. They are sorted in order of increasing difficulty, which is

- "Cracking" gives solutions in Java, although the code seems to have
some errors (see other reviews on amazon). "Exposed" gives solutions
in a mix of languages (C++, Java, C#), although they only use one
language per question.

- "Cracking" contains some grammatical errors (for example, Gayle
often mixes up "eg" and "ie"). In addition, many explanations would be much clearer with
an example.

- Both books are similar in length (about 300 pages), and their "non
technical" advice is very similar.

- Overall, "Exposed" is easier to read, but "Cracking" has more
content. Tough call.

There is also the good book "Algorithms For Interviews" by Adnan Aziz
and Amit Prakash (2010), which contains much harder questions,
focusing on clever algorithms and not on implementation details. Do
not attempt this book before mastering "Cracking" and/or "Exposed",
you will find it demoralizing! But it's probably worth trying some of
these harder problems, to see how "fancier" algorithms (like Dijkstra,
or max-flow min-cut, or dynamic programming) can be applied in
creative ways.
51 of 58 people found the following review helpful
HASH(0x9cd141e0) out of 5 stars A 'Must-study' before taking a Tech Interview March 27 2011
By ginnie - Published on Amazon.com
Format: Paperback
If you are planning to appear for a technical interview at any big software-firm, I highly recommend studying this book.

When I started my preparation, the entire process seemed really daunting. There is so much to study, and there is vast amount of study-material available out there. I was really confused on what/how to prepare. A friend of mine suggested me this book and so I read it.

To summarize, this book is an awesome compilation of problems, strategies and approaches you must know for doing well in a Tech interview.

It starts with chapters focusing on non-coding aspects (company-info, resume, behavioral etc.). I feel that, thoroughly covering just these first 30 pages is suffice for doing well in the 'HR' parts of tech-interviews.

After that, it contains 150 questions grouped by categories, covering all the relevant areas. And finally it has useful information, solutions and discussions for all the questions.

Qu. "If I memorize solutions for all these questions, Can I crack an Interview?" Ans. No Way!
Rather, if you slog through these questions, learning techniques; I am sure you will be able to solve questions on that day.

Solving problems through the book, I learnt different [ingenious] approaches. And with practice, I was be able to [/tried to] identify patterns in new questions that I faced.

I particularly love 3 chapters- "Recursion", "Moderate Interview Problems", "Hard Interview Problems". Because they contain some really neat algorithms :)

Hope this review helps.. And all the best for your interview :)
42 of 47 people found the following review helpful
HASH(0x9e255588) out of 5 stars Still have many errors even in 4th edition Sept. 23 2010
By laozi2000 - Published on Amazon.com
Format: Paperback
In general this is a good book to cover technical interview questions and some very useful tips for how to prepare and act for the on-site interview on technical questions. However, there are still several obvious errors in the books, especially codes and some formulas. For example,

in page 47 Question: What is the running time of this code?
The two sample codes are exactly the same and the first one should be something not using StringBuffer().

And in page 258, in the middle paragraph
Time_Stamp(P2_1) - Time_Stamp(P2_N)
should be
Time_Stamp(P2_1) - Time_Stamp(P1_N)

Hope this error can be identified by readers and they can still get the job.