I can not understand the question description, can any one explain it?


  • 6
    L

    I can not understand the question description, can any one explain it?


  • 4
    W

    give you some examples

    • empty + 1 = [1,1]
    • [1,1] , [4,4] + 6 = [1,1], [4,4] , [6,6]
    • [1,1] , [3,3] + 2 = [1,3]
    • [1,1] , [4,4] + 5 = [1,1] , [4,5]
    • [1,1] , [4,4] + 3 = [1,1] , [3,4]
    • [1,2,3] + [5,6,7] + 4 = [1,2,3,4,5,6,7]

  • 9
    P

    u need to combine the numbers if they are in range. eg: 1, 3 - they cannot be combined as there is num missing to form a range So we need to output it as separate ranges [1,1] and [3,3] . Inorder to have range [1,3] u need 2. only if u hv 2 can u combine it in one range saying [1, 3] (1,2,3)


Log in to reply
 

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