MCPcopy Create free account
hub / github.com/ccagml/leetcode-extension / Master

Class Master

resources/debug/entry/python3/problems/843.py:1–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1class Master:
2 def __init__(self, secret, wordlist):
3 self.secret = secret
4 self.wordlist = wordlist
5
6 def guess(self, word: str) -> int:
7 match = 0
8 if word not in self.wordlist:
9 return -1
10 for i, val in enumerate(word):
11 if (val == self.secret[i]):
12 match += 1
13
14 return match
15
16
17def runUserScript(func, params, paramTypes):

Callers 1

runUserScriptFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected