**Problem Statement:**
Given an unsorted array of integers `nums`, return the length of the longest consecutive elements sequence. You must write an algorithm that runs in `O(n)` time.
**Hint / Expected Approach:**
Hash set: only start from sequence head
**Edge Cases to Consider:**
- (1) All duplicates
- (2) Single element
- (3) Already consecutive