Happy Number
Medium
In number theory, a happy number is defined as a number that, when repeatedly subjected to the process of squaring its digits and summing those squares, eventually leads to 1. An unhappy number will never reach 1 during this process, and will get stuck in an infinite loop.
Given an integer, determine if it's a happy number.
Example:
Input: n = 23
Output: True
Explanation: 22 + 32 = 13 ⇒ 12 + 32 = 10 ⇒ 12 + 02 = 1