An array of distinct integers, find length of the longest subarray which contains numbers that can be arranged in a continuous sequence.
Tag - java program for finding maximum number in array
we have discussed a solution that assumes that elements in given array are distinct. Here we discuss a solution that works even if the input array.
Given an array and a number k where k is smaller than size of array, we need to find the k’th smallest element in the given array.