def merge(left, right, merged):
left_cursor, right_cursor = <NUM_LIT:0>, <NUM_LIT:0><EOL>while left_cursor < len(left) and right_cursor < len(right):<EOL><INDENT>if left[left_cursor] <= right[right_cursor]:<EOL><INDENT>merged[left_cursor+right_cursor]=left[left_cursor]<EOL>left_cursor += <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>merged[left_cursor + right_cursor] = right[right_cursor]<EOL>right_cursor += <NUM_LIT:1><EOL><DEDENT><DEDENT>for left_cursor in range(left_cursor, len(left)):<EOL><INDENT>merged[left_cursor + right_cursor] = left[left_cursor]<EOL><DEDENT>for right_cursor in range(right_cursor, len(right)):<EOL><INDENT>merged[left_cursor + right_cursor] = right[right_cursor]<EOL><DEDENT>return merged<EOL>
Merge helper
        Complexity: O(n)