about | help | code help+videos | done | prefs |
Find the sum of the first n perfect squares when n is negative, return 0. e.g. sumOfFirstNSquares(3) is 1 + 4 + 9 which is 14 sumOfFirstNSquares(1) → 1 sumOfFirstNSquares(2) → 5 sumOfFirstNSquares(3) → 14 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 5
Copyright Nick Parlante 2017 - privacy