Please give an example of output


  • 0
    U

    It always says for input - [2], 3
    output expected is [2], and output of the code is [], thus wrong.
    But that cannot be, cause I tested with the input, output is consistent.

    Code is in C++.

    Please provide an example output.


  • 1
    G

    Example: [2], 3

    Output: [2]

    Return: 1 //nothing is removed so new length is still 1

    Example: [2,3,2], 3

    Output: [2,2,_] //the last one doesn't matter

    Return: 2 //


Log in to reply
 

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