I'm working with javascript\jquery and i need to check if a numeric array values are sequential and contiguous and to return incorrect values.
Example
arr = [1,2,3,10,15,30] array is sequential but only 1,2,3 are contigous...10 15 and 30 are incorrect.
UPDATE
if array is like this arr = [1,2,3,10,11,12,15,30,50] the correct sequences should be 2... 1,2,3 and 10,11,12
How can i identify multiple correct sequences?
Thanks in advance, Cla