We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
i think it is worth mentioning that i could not recall the formulas for sum of squares for natural number. So i tried to play around with multinomial expansion and I got to a solution that performed better than the formula based solution using O(n) memory!
Project Euler #6: Sum square difference
You are viewing a single comment's thread. Return to all comments →
i think it is worth mentioning that i could not recall the formulas for sum of squares for natural number. So i tried to play around with multinomial expansion and I got to a solution that performed better than the formula based solution using O(n) memory!
https://trans4mind.com/personal_development/mathematics/series/multiNomialExpansion.htm