Why does leetcode think it is wrong answer


  • 3
    C

    Leetcode thinks my solution fails the following test case:
    Input: "a", [read(0),read(1),read(2)]
    Output: ["","a",""]
    Expected: ["","a",""]

    but my output is exactly the expected output.
    Did I miss anything?


  • 0
    B

    Similar issue here, got "Wrong answer" for this:
    Input:
    "ab", [read(1),read(2)]
    Output:
    ["a","b"]
    Expected:
    ["a","b"]


  • 0
    S

    could it be that you return not the actual number of characters read into buffer?


Log in to reply
 

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