Two Sigma interview question

A recursive word search question.