Remove shortest subarray to sort array | Apple