Skip to content

Commit 69e2c7d

Browse files
another typo fix 🙃
1 parent 884cfa4 commit 69e2c7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

problems/2582/jeremymanning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- I think this is pretty straightforward
55
- For a list of length $n$, it takes $n - 1$ passes to get to the last person, and another $n - 1$ passes (backwards through the line) to get back to the first person. So the cycle resets every $2(n - 1)$ passes.
66
- Therefore we can immediately mod the number of passes by $2(n - 1)$ without affecting the final position
7-
- After doing so, if the remainder is less than $n$, return the remainder + 1. Otherwise (the remainder must be greater than or equal to $n$ and less than $2(n - 1) - 1$ return $2n$ - the remainder - 1.
7+
- After doing so, if the remainder is less than $n$, return the remainder + 1. Otherwise (the remainder must be greater than or equal to $n$ and less than $2(n - 1)$ return $2n$ - the remainder - 1.
88

99
## Refining the problem
1010
- Any special cases to deal with?

0 commit comments

Comments
 (0)