Master Theorem For Subtract and Conquer Recurrences | Javascript code for above the approach . ; Driver Code
function fib ( n ) { if ( n <= 1 ) return n ; return fib ( n - 1 ) + fib ( n - 2 ) ; } let n = 9 ; document . write ( fib ( n ) ) ;