Array
128. Longest Consecutive Sequence
The O(n) constraint is the whole puzzle — sorting would make this trivial and O(n log n), so the interesting question is how to find consecutive runs without ordering the data. Drop everything into a…
Loading…