Search⌘ K
AI Features

Sum of Squares of Special Elements

Understand how to identify special elements in an array based on index divisibility and compute the sum of their squares. This lesson helps you apply mathematical reasoning to solve array problems efficiently, reinforcing fundamental coding interview problem-solving skills.

Statement

You are given a 11-indexed integer array nums of length n.

An element nums[i] is considered special if i divides n evenly, meaning n % i == 0.

Return the sum of the squares of all special elements in nums.

...