Oracle Application Software Developer
666
May 19, 2024
GIven a unsorted array we have to find the longest consecutive.
Note: Should not sort or use any datastructure which sort the array. The arrays also contains duplicate so you should count one time even its duplicate value is present.
example {100,98.-1,0,99,1,3,4,2,5,67}
In this -1 0 1 2 3 4 5 which is the longest consecutive. the count is 7 output is 7.
Comments (2)


