Problem Description

Task: return length of the longest consecutive sequence (order in array does not matter). Use HashSet.

Input Format

Java method

Output Format

Return value

Constraints

Expected O(n) average.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next