Discover Interview Question

Sort an array between some positions