with DP
longestConsecutives sequence