Pergunta de entrevista da empresa Chewy

Write a function to determine if two sentences have similar words.