Dynamic Programming For Coding Interviews: A Bottom-Up Approach To Problem Solving

About The Book

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 204668309 times while computing the 40th term.

Available Coupons

Coupons redeemable on this product:
prev-arrow
Coupon Code
ACAD5
Extra 5% off on Acad & Exam Prep Books
Valid until 31 December, 2025
next-arrow
Piracy-free
Piracy-free
Assured Quality
Assured Quality
Secure Transactions
Secure Transactions
Fast Delivery
Fast Delivery
Sustainably Printed
Sustainably Printed
Delivery Options
Please enter pincode to check delivery time.
*COD & Shipping Charges may apply on certain items.
Review final details at checkout.
downArrow

Details

ISBN 13
:
9781946556691
Publication Date
:
01-08-2022
Pages
:
142
Weight
:
153 grams
Dimensions
:
152.4x228.6x8.41 mm
Publisher

Ratings & Reviews

coupon
No reviews added yet.

LOOKING TO PLACE A BULK ORDER?CLICK HERE

More Books By The Author

If You Liked This, Try These