Why the fourth "get" method return -1 for this test case?


  • 0
    X

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


Log in to reply
 

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