A question on a quiz asked which value in [12, 13, 14, 15] is the first assigned to
right sorted. Apparently the answer was 13, I thought is was 14. Could you explain how?
def merge_sort(items): if len(items) <= 1: return items middle_index = len(items) // 2 left_split = items[:middle_index] right_split = items[middle_index:] left_sorted = merge_sort(left_split) right_sorted = merge_sort(right_split) return merge(left_sorted, right_sorted) def merge(left, right): result =  while (left and right): if left < right: result.append(left) left.pop(0) else: result.append(right) right.pop(0) if left: result += left if right: result += right return result