Longest Consecutive Sequence
Given an unsorted array of integers Find the length of the longest consecutive elements sequence Must run in O(n) time Example: [100,4,200,1,3,2] => 4 (sequence is [1,2,3,4])
Under the hood, Longest Consecutive Sequence is about traversing relationships without getting trapped in cycles. Interviewers love it because it reveals your modeling relationships and your edge-case discipline. Be careful with cycles and disconnected pieces; a missing visited rule can blow up quickly.

Meet Coco
Coco is an AI study partner, not a person. She listens while you explain your code, asks what a line does and never hands you the fix. Typing with Coco is free when you sign in, up to a daily limit. Talking with her out loud comes with the $79 pack. Anyone can open the editor and run their code.
Each locked part opens in the editor once the part before it passes.