@@ -0,0 +1,718 @@
+package leetcode;%0A%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0A%0A/**%0A * https://leetcode.com/problems/happy-number/%0A */%0Apublic class Problem202 %7B%0A    public boolean isHappy(int n) %7B%0A        Set%3CInteger%3E set = new HashSet%3C%3E();%0A        return isHappy(n, set);%0A    %7D%0A    %0A    private boolean isHappy(int n, Set%3CInteger%3E set) %7B%0A        if (n == 1) %7B%0A            return true;%0A        %7D%0A        if (set.contains(n)) %7B%0A            return false;%0A        %7D%0A        set.add(n);%0A        String s = Integer.toString(n);%0A        int val = 0;%0A        for (char c : s.toCharArray()) %7B%0A            int num = Integer.parseInt(Character.toString(c));%0A            val += num * num;%0A        %7D%0A        return isHappy(val, set);%0A    %7D%0A%7D%0A

Solve problem 202