Wrong Test Case


  • 0
    M

    Regarding the following test case for 432. All O`one Data structure:

    ["AllOne","inc","inc","inc","inc","getMaxKey","inc","inc","inc","dec","inc","inc","inc","getMaxKey"]
    [[],["hello"],["goodbye"],["hello"],["hello"],[],["leet"],["code"],["leet"],["hello"],["leet"],["code"],["code"],[]]
    

    After the last "inc", the values of "leet" and "code" should both be three. So the return value of the last "getMaxKey" could be either "leet" or "code". But shows my answer is wrong when my output is "leet".


  • 0

    @MaxPoon I've fixed this. Could you please try again?


  • 0
    M

    @1337c0d3r Thanks. It passes the test this time.


  • 0
    G

    Got similar wrong test case for C++. Submitted in https://discuss.leetcode.com/topic/63626/wrong-test-case-for-c


  • 0

    @1337c0d3r Two more, observed with "Run Code" on Python and C++.

    Input:
    ["AllOne","inc","inc","inc","inc","inc","inc","inc","getMinKey"]
    [[],["a"],["a"],["a"],["b"],["b"],["b"],["b"],[]]
    
    Expected answer:
    [null,null,null,null,null,null,null,null,"b"]
    

    That's wrong, should be "a".


    Input:
    ["AllOne","inc","inc","inc","inc","inc","inc","inc","inc","inc","inc","inc","inc","inc","inc","inc","inc","inc","inc","inc","dec","getMinKey"]
    [[],["a"],["a"],["a"],["a"],["a"],["a"],["a"],["a"],["a"],["a"],["a"],["a"],["a"],["a"],["a"],["a"],["b"],["b"],["c"],["c"],[]]
    
    Expected answer:
    None
    

    I guess the judge's solution crashes here?


  • 0

    @StefanPochmann Thanks. @galster Could you please fix this?


Log in to reply
 

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