Amazon Interview Question

Word count of a paragraph

Interview Answers

Anonymous

Jan 24, 2011

Just go through the String or Array and keep track of the number of delimiters (space,comma,period,etc). O(n).

Anonymous

May 12, 2012

use the split function and get the length of the array.

1