A special diversion of “the longest ….”. To make it O(n), let the pointer move rather than nested for loop.
Description
Given an unsorted array of integers nums, return the length of the longest consecutive…
nums