File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
src/main/kotlin/g0201_0300/s0212_word_search_ii Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package g0201_0300.s0212_word_search_ii
33// #Hard #Top_Interview_Questions #Array #String #Matrix #Backtracking #Trie
44// #2022_10_24_Time_268_ms_(100.00%)_Space_37.5_MB_(95.08%)
55
6+ @Suppress(" NAME_SHADOWING" )
67class Solution {
78 private var root: Tree ? = null
89 fun findWords (board : Array <CharArray >, words : Array <String ?>): List <String > {
@@ -36,7 +37,7 @@ class Solution {
3637 val s: String = cur.end!!
3738 collected.add(s)
3839 cur.end = null
39- if (cur.len() == = 0 ) {
40+ if (cur.len() == 0 ) {
4041 Tree .deleteWord(root, s)
4142 }
4243 }
Original file line number Diff line number Diff line change 11package g0201_0300.s0212_word_search_ii
22
3+ @Suppress(" NAME_SHADOWING" )
34class Tree {
45 private var children: Array <Tree ?>? = null
56 var end: String? = null
You can’t perform that action at this time.
0 commit comments