Maximize Sum of Squares of Digits

Solution Code

Time Complexity

O(num)

Space Complexity

O(1)