Does the problem specialize the order of intervals in output?


  • 0
    V

    get WA like this when using union-find approach:
    Output: [null,null,[[6,6]],null,[[6,6]],null,[[0,0],[6,6]],null,[[0,0],[4,4],[6,6]],null,[[0,0],[8,8],[4,4],[6,6]],null,[[0,0],[6,8],[4,4]],null,[[0,0],[6,8],[4,4]],null,[[0,0],[6,8],[4,4]],null,[[0,0],[6,8],[4,4]],null,[[0,0],[4,8]]]
    while expected
    Expected:[null,null,[[6,6]],null,[[6,6]],null,[[0,0],[6,6]],null,[[0,0],[4,4],[6,6]],null,[[0,0],[4,4],[6,6],[8,8]],null,[[0,0],[4,4],[6,8]],null,[[0,0],[4,4],[6,8]],null,[[0,0],[4,4],[6,8]],null,[[0,0],[4,4],[6,8]],null,[[0,0],[4,8]]]


Log in to reply
 

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