Something to do with algorithm.
Implement longest_consecutive(nums), which returns the length of the longest sequence of consecutive integers in an unsorted list. The sequence values must increase by exactly one, and duplicate values count only once.
nums is a list of integers. Return an integer representing the longest consecutive sequence length.
def longest_consecutive(nums):