The problem says, "summarize the numbers seen so far as a list of disjoint intervals," but it's really checking that you're returning a *sorted* list of disjoint intervals. Either the wording in the problem should be adjusted or the output checking mechanism should be fixed. The requirement that the returned intervals must be sorted forces solutions that use disjoint sets (e.g., union-find) to sort the result at the end, which is dumb.