golang testcases maybe wrong


  • 0
    B
    func (this *StringIterator) Next() byte
    

    I return byte in function, but no output when I submit,
    just got output like this "

    Output:
    [null,,,,,,,true,,true]
    Expected:
    [null,'L','e','e','t','C','o',true,'d',true]
    

    Well, when I change the return type to string,

    func (this *StringIterator) Next() string
    

    the submit result is like this,

    Output:
    [null,"L","e","e","t","C","o",true,"d",true]
    Expected:
    [null,'L','e','e','t','C','o',true,'d',true]
    

    Why there is nothing in output when return type is byte?


Log in to reply
 

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