Could some one point out why my solution is this slow? I saw similar solutions out there that run < 10ms

Thanks in advance.

```
public class Solution {
public boolean isHappy(int n) {
List<Integer> set=new ArrayList<Integer>();
while(!set.contains(n)){
set.add(n);
System.out.println(n);
n=squaresum(n);
if(n==1) return true;
}
return false;
}
public int squaresum(int n){
int sum=0;
while(n!=0){
sum=sum+(n%10)*(n%10);
n=n/10;
}
return sum;
}
```

}