How is the expected output for this false? [1,2] 1 -1, (1-2 = -1 == t) k=1 as well, Please explain?


  • 2
    N

    How is the expected output for this false? [1,2] 1 -1, (1-2 = -1 == t) k=1 as well, Please explain?


  • -1
    C
    The difference t in the question is always (higher number - lower number),which implies t always will be greater than equal to zero.
    While taking test cases , if t considered negative irrespective of the array taken and k considered the output would be false

  • 0
    C
    This post is deleted!

Log in to reply
 

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