Chewy Interview Question

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