[LeetCode] 212. Word Search II, Hard
·
CodingTest/LeetCode
1. 문제문자열로 구성된 words 배열과, 문자로 이루어진 2차원 배열 board가 주어질 때 수평, 수직에 인접한 문자를 조합하여 만들 수 있는 단어 배열을 반환하라.각 단어에 같은 문자는 1번만 쓰일 수 있다.2. 해결class TrieNode { children: Map word: string; constructor() { this.children = new Map(); this.word = null; }}class Trie { root: TrieNode; constructor() { this.root = new TrieNode(); } insert(word:string) { let node = t..