Sum of Squares of Special Elements

Solution Code

Time Complexity

O(n)

Space Complexity

O(1)