What does t = -1 mean?

  • 0

    My solution fails on this case

    nums: [-1,-1]
    k: 1
    t: -1

    why it should return false?

  • 0

    In the problem description,

    the difference between nums[i] and nums[j] is at most t

    That means, abs( nums[i] - nums[j] ) <= t, which must be bigger than or equal to 0.

  • 0

    It is very confusing to me too. I think it just mean to reject no matter what as long as t < 0.

Log in to reply

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