Domanda di colloquio di Amazon

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

Risposta di colloquio

Anonimo

7 gen 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.