SunPower interview question

Typical random Leetcode coding exercise.