Created
October 21, 2016 15:22
-
-
Save MichaelWalker-git/d7a75e32ac9af4c7cb3c9e2293206847 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function prefixSums(A){ | |
var leng = A.length; | |
p = [0] * (leng +1); | |
for(var i = 0; i< leng+1; i++){ | |
P[i] = P[i-1] + A[i-1]; | |
} | |
return P; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment