Time: O(N⋅3L) where N is number of cells in board and L is length of the word.
LC explanation:
See In worst case we have to travel till last cell of the matrix and now in last cell our recursion depth will go as far 3L , now why not 4L because we never visit the path where we came from, which is the base case. i.e say we found the first letter, and then the second letter. Now, when we traverse, we have 4 possible paths (assume good case), but we will not go back to the first letter again (i.e travel backwards).
Space: O(L) where L is length of the word since this is how the stack would grow.
Notes
Backtracking is costly, figure out ways to bail early.
A way to avoid visited is to manipulate the board and make the squares "" before traversing adjacent nodes and restore the square value after traversal.