HN Books @HNBooksMonth

The best books of Hacker News.

Hacker News Comments on
Dynamic Programming for Coding Interviews: A Bottom-Up approach to problem solving

Meenakshi, Kamal Rawat · 1 HN comments
HN Books has aggregated all Hacker News stories and comments that mention "Dynamic Programming for Coding Interviews: A Bottom-Up approach to problem solving" by Meenakshi, Kamal Rawat.
View on Amazon [↗]
HN Books may receive an affiliate commission when you make purchases on sites after clicking through links on this page.
Amazon Summary
I wanted to compute 80th term of the Fibonacci series. I wrote the rampant recursive function, int fib(int n){ return (1==n || 2==n) ? 1 : fib(n-1) + fib(n-2); } and waited for the result. I wait… and wait… and wait… With an 8GB RAM and an Intel i5 CPU, why is it taking so long? I terminated the process and tried computing the 40th term. It took about a second. I put a check and was shocked to find that the above recursive function was called 204,668,309 times while computing the 40th term. More than 200 million times? Is it reporting function calls or scam of some government? The Dynamic Programming solution computes 100th Fibonacci term in less than fraction of a second, with a single function call, taking linear time and constant extra memory. A recursive solution, usually, neither pass all test cases in a coding competition, nor does it impress the interviewer in an interview of company like Google, Microsoft, etc. The most difficult questions asked in competitions and interviews, are from dynamic programming. This book takes Dynamic Programming head-on. It first explain the concepts with simple examples and then deep dives into complex DP problems.
HN Books Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this book.
Two weeks is not enough even to read something like https://www.amazon.com/Dynamic-Programming-Coding-Interviews... unless you are already unemployed. Also, some of us have practiced actually writing software for the last 20 years. And in my limited spare time I'd rather study something useful.

The world is full of people who have passed leetcode puzzles. But to this day somehow I see more JSON over HTTP than gRPC in the wild. Or developers (or is it their managers?) saying that Scala is too complicated. Comments in the code? Meaningful README files? Even descriptive commit messages are less common than HN would make you believe.

HN Books is an independent project and is not operated by Y Combinator or Amazon.com.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.