If the loop was stopped due to k becoming more than n - 1 , set the remaining entities in column j as 2
while ( i >= 0 ) : NEW_LINE INDENT L [ i ] [ j ] = 2 NEW_LINE i -= 1 NEW_LINE DEDENT return llap NEW_LINE