Word Search II

Given an m x n board of lowercase letters and a list of words, return every word that can be built by moving between edge-adjacent cells without reusing a cell in the same path. The same word is reported once even when several paths spell it, and the order of the answer does not matter.

Examples
Input: [["oaan","etae","ihkr","iflv"],["oath","pea","eat","rain"]]
Output: ["eat","oath"]
Hints
Related Problems

Word Search II

Given an `m x n` board of lowercase letters and a list of words, return every word that can be built by moving between edge-adjacent cells without reusing a cell in the same path. The same word is reported once even when several paths spell it, and the order of the answer does not matter.