Since there are 2 n elements , median will be average of elements at index n - 1 and n in the array obtained after merging ar1 and ar2
count = 0 NEW_LINE while count < n + 1 : NEW_LINE INDENT count += 1 NEW_LINE DEDENT