Wrong test case

  • 0

    Input : [1, -1], 1

    Expected: [1,-1]

    My code returns: [1,1]

    I think the expectation is wrong.

  • 0

    I had the same thoughts as well at first. But then I realize that the max means the max in the current window. Therefore, for a window of size 1, it basically is the original vector.

Log in to reply

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