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.
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

LOOKING TO PLACE A BULK ORDER?CLICK HERE