Back to the Problem
Deduplicate, sort, and count runs where each day is the previous plus one.
Complexity: O(N log N)