Delannoy Number | Return the nth Delannoy Number . ; Base case ; Recursive step . ; Driven code
def dealnnoy ( n , m ) : NEW_LINE INDENT if ( m == 0 or n == 0 ) : NEW_LINE INDENT return 1 NEW_LINE DEDENT return dealnnoy ( m - 1 , n ) + dealnnoy ( m - 1 , n - 1 ) + dealnnoy ( m , n - 1 ) NEW_LINE DEDENT n = 3 NEW_LINE m = 4 ; NEW_LINE print ( dealnnoy ( n , m ) ) NEW_LINE