Wrong test case?


  • -1
    T

    For this simple test case, I don't understand why the "get" should get a 2. Isn't the value of key 2 is 1?

    Input:
    ["LFUCache","set","get"]
    [[1],[2,1],[2]]
    Output:
    [null,null,2]
    Expected:
    [null,null,1]


  • 0
    M
    This post is deleted!

  • 0
    M

    The value of key 2 is exactly 1, but ur code returned 2 in the Output.

    The Expected answer is [null,null,1] and ur Output answer is [null,null,2] so u get a WA.

    @tdwong


Log in to reply
 

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