Find the longest successive nums in an array