Java String Tokens

  • [deleted]
    + 44 comments

    3 issues need to be noticed in order to solve all cases:

    1) trim the string

    2) handle string.length() > 400000 => don't print anything

    3) handle string.length() == 0 => print "0"