Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codedecks-in/LeetCode-Solutions
/ SquareSum
Method
SquareSum
Java/Happy-Number.java:20–29 ·
view source on GitHub ↗
(int n)
Source
from the content-addressed store, hash-verified
18
19
20
static
int
SquareSum(
int
n)
21
{
22
int
square = 0;
23
while
(n!= 0)
24
{
25
square += (n % 10) * (n % 10);
26
n /= 10;
27
}
28
return
square;
29
}
30
31
}
Callers
1
isHappy
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected