Given an array in which elements are unsorted. Write an algorithm that gives two indices n1,n2 such that if you sort just the elements of the array from n1 to n2, then the whole array will be sorted.

Given an array in which elements are unsorted. Write an algorithm that gives two indices n1,n2 such that if you sort just the elements of the array from n1 to n2, then the whole array will be sorted.

Ques:- Given an array in which elements are unsorted. Write an algorithm that gives two indices n1,n2 such that if you sort just the elements of the array from n1 to n2, then the whole array will be sorted.
0 3877

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top