Skip to content

Commit 884cfa4

Browse files
typo fix
1 parent c84ee22 commit 884cfa4

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
@@ -3,7 +3,7 @@
33
## Initial thoughts (stream-of-consciousness)
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.
6-
- Therefore we can immeidately mod the number of passes by $2(n - 1)$ without affecting the final position
6+
- Therefore we can immediately mod the number of passes by $2(n - 1)$ without affecting the final position
77
- 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.
88

99
## Refining the problem

0 commit comments

Comments
 (0)