Sort y points inside merge