Answer checking mechanism wrongly assumes output must be in sorted order


  • 0
    K

    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.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.