@@ -0,0 +1,508 @@
+public class Solution %7B%0A  // Beats 96%25 of the solutions.%0A  // Magic numbers 85/58/16/61 are indicators that number will eventually produce cycle.%0A  public boolean isHappy(int n) %7B%0A    if (n %3C= 0) return false;%0A    int orig = n;%0A    while (n != 1) %7B%0A      int tmp = n;%0A      n = 0;%0A      while (tmp != 0) %7B%0A        int sq = tmp %25 10;%0A        n += sq * sq;%0A        tmp /= 10;%0A      %7D%0A      if (n == orig %7C%7C n == 85 %7C%7C n == 58 %7C%7C n == 16 %7C%7C n == 61) %7B%0A        return false;%0A      %7D%0A    %7D%0A    return true;%0A  %7D%0A%7D%0A

add happy-number solution