diff --git a/maths/sum_of_squares.py b/maths/sum_of_squares.py index 1af5d0b8b..d5265153e 100644 --- a/maths/sum_of_squares.py +++ b/maths/sum_of_squares.py @@ -4,6 +4,8 @@ This script demonstrates the implementation of the sum of squares of the first n The function takes an integer n as input and returns the sum of squares from 1 to n using the formula n(n + 1)(2n + 1) / 6. This formula computes the sum efficiently without the need for iteration. + +https://www.cuemath.com/algebra/sum-of-squares/ """ def sum_of_squares(n: int) -> int: