| 15 | class Solution { |
| 16 | public: |
| 17 | int next(int n) { |
| 18 | int sum = 0; |
| 19 | while (n != 0) { |
| 20 | int d = n % 10; |
| 21 | n /= 10; |
| 22 | sum += d * d; |
| 23 | } |
| 24 | return sum; |
| 25 | } |
| 26 | |
| 27 | // two pointer |
| 28 | bool isHappy(int n) { |
nothing calls this directly
no outgoing calls
no test coverage detected