Traverse both the array
while ( index < N and l < N and r < M ) : NEW_LINE INDENT if ( arr [ l ] < brr [ r ] ) : NEW_LINE INDENT Pivot = arr [ l ] NEW_LINE l += 1 NEW_LINE DEDENT else : NEW_LINE INDENT Pivot = brr [ r ] NEW_LINE r += 1 NEW_LINE DEDENT index += 1 NEW_LINE DEDENT