pub fn fibonacci_dynamic(n: i32) -> (i32, i32) {
    if n == 0{
        return (1,0);
    }

    let (a, b) = fibonacci_dynamic(n-1);
    (a + b, a)
}
// return (res, prev)
// if you are going to use the same funtion mote than once
// store the result somewhere
return (res, prev)
if you are going to use the same funtion mote than once
store the result somewhere
return ( res prev ) if you are going to use the same funtion mote than once store the result somewhere
pub fn fibonacci_dynamic(n: i32) -> (i32, i32) {
    if n == 0{
        return (1,0);
    }
    let (a, b) = fibonacci_dynamic(n-1);
    (a + b, a)
}
pub fn fibonacci_dynamic ( n : i32 ) -> ( i32 , i32 ) { if n == 0 { return ( 1 , 0 ) ; } let ( a , b ) = fibonacci_dynamic ( n - 1 ) ; ( a + b , a ) }
return (res, prev)
if you are going to use the same funtion mote than once
store the result somewhere
return ( res prev ) if you are going to use the same funtion mote than once store the result somewhere
n
i32
n
i32