Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Dynamic Programming for Coding Interviews: A Bottom-Up approach to problem solving Paperback – January 16, 2017
"Enlightenment Now: The Case for Reason, Science, Humanism, and Progress"
Is the world really falling apart? Is the ideal of progress obsolete? Cognitive scientist and public intellectual Steven Pinker urges us to step back from the gory headlines and prophecies of doom, and instead, follow the data: In seventy-five jaw-dropping graphs, Pinker shows that life, health, prosperity, safety, peace, knowledge, and happiness are on the rise. Learn more
Frequently bought together
Customers who bought this item also bought
Customers who viewed this item also viewed
"This is one of the best books on Dynamic Programming." - Gaurav Sehgal, Engineering Manager, Amazon.
From the Author
DP is one of the most complex problem solving approaches in computer science. At the same time, benefits that DP provide are huge, it usually reduces the time taken from exponential to polynomial. So getting it right is very important.
In most algorithm books, there is one chapter dedicated to DP, that discuss related concepts like optimal substructure, overlapping sub-problems, memoization, etc. And then there are few complex examples to showcase working of DP.
The approach we have followed in this book is that we have one chapter for each concept. And while discussing the concepts, we have taken very simple examples, so that focus remains on the concept. Once the concept is understood, we deep dive into complex problem solving.
Top customer reviews
There was a problem filtering reviews right now. Please try again later.
Why ? Even though it has solutions to some of the most common and known dynamic programming questions, and discusses the basics of how dynamic programming is different than recursive or brute force strategies, it doesn't help us understand how to come up with those solutions. It doesn't give us pointers on why a particular problem was solved the way it was. It discusses the solution, but not how to come up with it.
For more initiated, read the solved example on Longest Common Subsequence, and then read the solved example of Longest Palindromic Subsequence from the book. You will understand what I am referring to here. They are closely related problems, and yet, if you look at the code for the second problem, you wont understand why did we do this way.
page 51- i and j are switched, no?
page 74- "code 8.6 takes exponential time, O(n^3)- shouldn't it be O(3^n)?
These are some of the mistakes I remember... and I still have a few problems to go through.
Overall, buy it as a way to learn dynamic programming quickly and prepare for interviews.