The system gives the wrong answers of these test cases...


  • 0

    [0,1,3,50,75]
    100
    110
    ANS: ["2","4->49","51->74","76->110"]
    Should it be ["100->110"] ???

    [0,1,3,50,75]
    1
    50
    ANS: ["2","4->49","51->74"]
    Should it be ["2","4->49"] ???


  • 0

    @yubad2000
    From the description,

    Given a sorted integer array where the range of elements are [lower, upper] inclusive.

    In your first example, the lower should be <= 0 and upper could be any number >= 75.

    Same with your second example.

    Both of your cases do not satisfy the requirement.


Log in to reply
 

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