Given an unsorted array sort the shortest sub-array which results in sorting of the whole array

welcome to shbcf.ru