JAVA || Iteration on the Array
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\nIterative approach\n\n# Complexity\n- Time complexity:\nO(n)\n\n- Space c
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\nIterative approach\n\n# Complexity\n- Time complexity:\nO(n)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(1)\n# Code\n```\nclass Solution {\n    public int sumOfSquares(int[] nums) {\n         int n=nums.length;\n        int sum=0;\n       for(int i=0;i<n;i++){\n           if(n%(i+1)==0){\n               sum+=Math.pow(nums[i],2);\n           }\n       }\n        return sum;\n    }\n}\n```
['Java']