Form the first increasing till every index i
for j in range ( i - 1 , - 1 , - 1 ) : NEW_LINE INDENT arrB [ j ] = min ( maximum , arrA [ j ] ) ; NEW_LINE maximum = arrB [ j ] ; NEW_LINE temp = j NEW_LINE DEDENT