Very vague problem description

  • 0

    There are multiple possibilities for input array that contains any amount of space like "", " ", " "; also it may even include other kind of white spaces such as a tab '\t' or '\r'
    The problem does not specified if we treat those "words" the same way as valid phrases or we simply get rid of them. This brings significant difference in implementation.

  • 4

    It is good to discuss this point with your interviewer. From a practical point of view, a 'word' is a string (mostly alphanumerical) that should not contain ANY white space characters.

  • 0

    Agreed. Still think it is one of the most tedious problems in Leetcode.

Log in to reply

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