Replies: 1 comment
-
class Solution:
def chalkReplacer(self, chalk: List[int], k: int) -> int:
rem = k % sum(chalk)
for i, c in enumerate(chalk):
if c > rem:
return i
rem -= c |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Link to problem:
🟡 #1894 - Find the Student that Will Replace the Chalk
Beta Was this translation helpful? Give feedback.
All reactions