Amazon interview question

Write a function to get the most repeated word in a string.

Interview Answer

Anonymous

7 Jan 2011

I started droning about tokenizing words and storing them in an array and then switched to a hash table when all it really needed was to sort all the words using strcmp and maintain a count for each word and return the word with the maximum count.