One Solution is to first sort the array and find the longest subarray with consecutive elements. Time complexity of this solution is O(nLogn).
longest increasing sequence
2 Articles
2
One Solution is to first sort the array and find the longest subarray with consecutive elements. Time complexity of this solution is O(nLogn).