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
3
3
// #Hard #Top_Interview_Questions #Array #String #Matrix #Backtracking #Trie
4
4
// #2022_10_24_Time_268_ms_(100.00%)_Space_37.5_MB_(95.08%)
5
5
6
+ @Suppress(" NAME_SHADOWING" )
6
7
class Solution {
7
8
private var root: Tree ? = null
8
9
fun findWords (board : Array <CharArray >, words : Array <String ?>): List <String > {
@@ -36,7 +37,7 @@ class Solution {
36
37
val s: String = cur.end!!
37
38
collected.add(s)
38
39
cur.end = null
39
- if (cur.len() == = 0 ) {
40
+ if (cur.len() == 0 ) {
40
41
Tree .deleteWord(root, s)
41
42
}
42
43
}
Original file line number Diff line number Diff line change 1
1
package g0201_0300.s0212_word_search_ii
2
2
3
+ @Suppress(" NAME_SHADOWING" )
3
4
class Tree {
4
5
private var children: Array <Tree ?>? = null
5
6
var end: String? = null
You can’t perform that action at this time.
0 commit comments