Count number of ways for remaining number n - i remaining parts " parts - 1" , and for all part varying from ' nextPart ' to 'n
' NEW_LINE INDENT for i in range ( nextPart , n + 1 ) : NEW_LINE INDENT ans += countWaysUtil ( n - i , parts - 1 , i ) NEW_LINE DEDENT DEDENT