Java String Tokens

  • [deleted]
    + 4 comments

    Thanks ! This helped me out a lot !

    One question. Case 9 fails for me. I know I must be overlooking something fairly obvious. The input for case 9 is just a bunch of spaces. The output for it should be 0, but I get 1.

    I tried setting the string length check (after trim()) for 0 as well as 400000, but it doesnt seem to work. Any inputs on what might have gone wrong ?