Test case improperly judged . For C test case returns correct result but submitting the solution doesn't for a test case


  • 0
    A

    This is the test case [0,0,0,0,null,null,0,null,null,null,0]

    When I submit the solution

    Input:
    [0,0,0,0,null,null,0,null,null,null,0]
    Output:
    5
    Expected:
    4

    For Custom test Case :

    Run Code Result: ×

    Your input

    [0,0,0,0,null,null,0,null,null,null,0]
    Your answer

    4
    Expected answer

    4

    Test cases are improperly judged.


  • 1
    H

    I came across exactly the same situation in Javascript. So confusing...


  • 0
    D

    Hello,

    I am experiencing the same problem too; I am using Java.

    :(


  • 0
    D

    I've managed to solve the issue by changing the modifier of a variable from class to instance level.


Log in to reply
 

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