input: Write a function to find the length of the longest consecutive sequence in an array.
  assert find_longest_sequence([1, 2, 3, 4, 5]) == 5
  assert find_longest_sequence([1, 3, 5, 7, 9]) == 1
  assert find_longest_sequence([10, 20, 30, 40]) == 1
  assert find_longest_sequence([1, 2, 2, 3, 4, 5, 6]) == 5
  assert find_longest_sequence([5, 6, 7, 8, 1, 2, 3]) == 4
output: def find_longest_sequence(nums):
      if not nums:
          return 0
      
      nums = set(nums)
      longest_streak = 0
      
      for num in nums:
          if num - 1 not in nums:
              current_num = num
              current_streak = 1
              
              while current_num + 1 in nums:
                  current_num += 1
                  current_streak += 1
              
              longest_streak = max(longest_streak, current_streak)
      
      return longest_streak