We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 961ed91 commit 9642d0cCopy full SHA for 9642d0c
algorithms/math/pascalTriangle.js
@@ -5,7 +5,7 @@ function pascalTriangle(lineNumber) {
5
6
for (let numIndex = 1; numIndex < currentLineSize; numIndex += 1) {
7
// See explanation of this formula in README.
8
- currentLine[numIndex] = currentLine[numIndex - 1] * (lineNumber - numIndex + 1) / numIndex;
+ currentLine[numIndex] = (currentLine[numIndex - 1] * (lineNumber - numIndex + 1)) / numIndex;
9
}
10
11
return currentLine;
0 commit comments