Delannoy Number | Java Program for finding nth Delannoy Number . ; Return the nth Delannoy Number . ; Base case ; Recursive step . ; driver function
import java . util . * ; import java . lang . * ; public class GfG { public static int dealnnoy ( int n , int m ) { if ( m == 0 n == 0 ) return 1 ; return dealnnoy ( m - 1 , n ) + dealnnoy ( m - 1 , n - 1 ) + dealnnoy ( m , n - 1 ) ; } public static void main ( String args [ ] ) { int n = 3 , m = 4 ; System . out . println ( dealnnoy ( n , m ) ) ; } }