MCPcopy Create free account
hub / github.com/neetcode-gh/leetcode / removeWord

Method removeWord

python/0212-word-search-ii.py:17–23  ·  view source on GitHub ↗
(self, word)

Source from the content-addressed store, hash-verified

15 cur.isWord = True
16
17 def removeWord(self, word):
18 cur = self
19 cur.refs -= 1
20 for c in word:
21 if c in cur.children:
22 cur = cur.children[c]
23 cur.refs -= 1
24
25
26class Solution:

Callers 1

dfsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected