Two Sigma Interview Question

I got asked Word Search II leetcode question