You are given a square grid of letters, representing a Boggle board, and a dictionary (a list of valid words).
Your task is to find all unique valid words present on this Boggle board.
Remember that:
letter cell can be used only once when forming a single word.word you find must be present in the provided dictionary to be considered valid.Return a list of all unique valid words found.
board = [["c", "a"], ["t", "s"]]
dictionary = ["cat", "at", "as", "sat", "cast", "cats", "tas", "acts", "act"]
["act", "acts", "as", "at", "cast", "cat", "cats", "sat", "tas"]
board = [["b", "e"], ["a", "t"]]
dictionary = ["be", "bat", "bet", "eat", "tea", "tab", "ate"]
["ate", "bat", "be", "bet", "eat", "tab", "tea"]
board = [["p", "i", "n", "e"], ["l", "p", "p", "a"], ["e", "n", "e", "s"]]
dictionary = ["pine", "pin", "pen", "apple", "pineapple", "pea", "ape", "sap", "sea", "plan", "pan", "lane", "line", "lap", "pal", "nap", "penal", "pane", "pale", "peal", "nil", "nap", "ins", "sin", "sip", "spin", "spin", "pins", "peins"]
["ape", "apple", "line", "nap", "nil", "pan", "pane", "pea", "pen", "pin", "pine", "pineapple", "sap", "sea", "spin"]
board = [["c", "a"], ["t", "s"]]
dictionary = ["cat", "at", "as", "sat", "cast", "cats", "tas", "acts", "act"]
["act", "acts", "as", "at", "cast", "cat", "cats", "sat", "tas"]