Given an array of integers in any order, return the LENGTH of the longest run of consecutive values (e.g. 1,2,3,4).

Input: 1004200132.

100
4
200
1
3
2

Sorting solves it in O(n log n). You'll walk right up to that O(n log n) barrier — then find a way to step around it, using more memory and not a single comparison.

Looking at 1004200132, which value is the START of the longest consecutive run?