Count occurences of a given word in a 2-d array
Find the number of occurrences of a given search word in a 2d-Array of characters where the word can go up, down, left, right and around 90 degree bends.
- Time : O(nm * |target|)
- Space : O(|target|)
c++
1 | class Solution { |