Delannoy Number | Return the nth Delannoy Number . ; Base case ; Recursive step . ; Driver Code
< ? php function dealnnoy ( $ n , $ m ) { if ( $ m == 0 or $ n == 0 ) return 1 ; return dealnnoy ( $ m - 1 , $ n ) + dealnnoy ( $ m - 1 , $ n - 1 ) + dealnnoy ( $ m , $ n - 1 ) ; } $ n = 3 ; $ m = 4 ; echo dealnnoy ( $ n , $ m ) ; ? >