Pergunta de entrevista da empresa Tessian

The code pair challenge: Writing a function that calculates the co-occurrence of two words in a string, and optimizing it step by step