The problem description seems to be ambiguous for the get() function.

  • 6

    The problem states that get() provides a number which is not assigned to anyone. It does not state the order of the number can be given.
    However, the test cases are expecting a certain order from get() function's returns.
    If this specific order is expected, it should be stated in the problem statement.

  • 1

    It appears to not really be expected. I wrote solutions that provide other orders and got them accepted. For such problems, I think of "Expected:" as "Example:"

  • -1

    Thats true.
    My code failed for this input


    expected output

Log in to reply

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