Fill entries of current row using previous row values
j = min ( i , r ) ; NEW_LINE while ( j > 0 ) : NEW_LINE INDENT C [ j ] = ( C [ j ] + C [ j - 1 ] ) % p ; NEW_LINE j -= 1 ; NEW_LINE DEDENT return C [ r ] ; NEW_LINE