Pergunta de entrevista da empresa Amazon

write a function to check whether there exists duplicated words in a string. Show your test case.