fill 1 st position by every digit from 1 to 9 and calls findNDigitNumsUtil ( ) for remaining positions
for i in range ( 1 , 10 ) : NEW_LINE INDENT out [ 0 ] = chr ( i + ord ( '0' ) ) NEW_LINE findNDigitNumsUtil ( n , sum - i , out , 1 ) NEW_LINE DEDENT