Assignment 1 questions.


R. Clayton (rclayton@clayton.cs.monmouth.edu)
(no date)


  Do we have to take care of garbage input?

The problem doesn't say anything about garbage, just white space and
non-white-space characters.

  Do either "joe%%%" or "%%%%joe" count as words?

Because none of 'j', 'o', 'e', or '%' are white-space characters, both must be
words.

  Do either "joe123" or "123joe" count as words?

Because none of 'j', 'o', 'e', '1', '2', or '3' are white-space characters,
both must be words.

  Or is a word strictly a sequence of alphabetical characters?

Again, the problem mentions only white space or non-white space characters.

  Is "have-a" one word or is it the two words "have" and "a"?

That's where the maximal part comes in: you have to find the longest sequence
of non-white-space characters. Because '-' is not a white-space character, it
would be incorrect to treat "have-a" as the two words "have" and "a" because 1)
you're incorrectly ignoring the non-white-space character '-' and 2) neither
"have" and "a" are maximal.



This archive was generated by hypermail 2.0b3 on Fri Dec 21 2001 - 17:00:04 EST