Tag: wordsearch

  • Word Search II

    Given a m*n board of letters and a list of words , find those words present in the board. For example, Given the board: and the below list of words: [“oath”,”pea”,”eat”,”rain”] The output is “eat” ,”oauth” Try out the solution here: https://leetcode.com/problems/word-search-ii/solution/ Solution: Let’s use Trie data structure to solve this problem. We could use…

  • Data Structures & Algorithms in Java – Matrix – Word Search

    Problem Given a n*n matrix containing characters, find if the given word can be found in any direction For example , The output for above problem is true since the word ABCGK can be found in the matrix. Try out the solution here: https://leetcode.com/problems/word-search/ Solution: The solution to this problem is backtracking You start with…