Skip to content

Commit 7092c64

Browse files
committed
fix(tutorials): broken formula
1 parent 8a3354e commit 7092c64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tutorials/math/combinatorics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ $b$ $=$ $\frac{k \, - \, endPos \, + \, startPos}{2}$
229229

230230
Then the solution is $k \choose a$ $=$ $k \choose b$ as we need to find number of ways to choose $a$ or $b$ moves, out of $k$ moves.
231231

232-
Thus, we need to find $nCr$$(k, \frac{k - endPos + startPos}{2})$.
232+
Thus, we need to find $nCr$ $(k, \frac{k - endPos + startPos}{2})$.
233233

234234
To implement this, you can both precompute the entire Pascal's Triangle, or use concept of mudular inverses to find the required value.
235235

0 commit comments

Comments
 (0)