What does this question exactly mean ?


  • 0
    M

    I can not understand what does this question is. the example show's none principles to summarize the ranges. why [0,1,2,4,5,7] should be summarized to ["0->2", "4->5", "7"], why not ["0-1", "2->5", "7"?

    who can explain this question more clearly ? thank you in advance.


  • 7
    A

    "0,1,2" form a continuous range, where each element is 1+ previous element.
    eg: [0,1,4,7,8,9] will be ["0->1", "4", "7->9"]


Log in to reply
 

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