public boolean contains(char[][] wordSearch, String word) {
    validateInputData(wordSearch, word);

    for (int i = 0; i < wordSearch.length; i++) {
      for (int j = 0; j < wordSearch[i].length; j++) {
        if (matches(wordSearch, i, j, word.charAt(0))) {
          if (isWordInWordSearchInner(wordSearch, word, i, j)) {
            return true;
          }
        }
      }
    }

    return false;
  }
Combination of iterative or recursive algorithm to solve this problem.The complexity order of
this algorithm is O(N*N*M) where N is the number of elements in every row of the matrix and M
is the number of chars in the word to search.
src/main/java/com/github/pedrovgs/problem48/WordSearch.java