Discover interview question

Sort an array between some positions