@@ -0,0 +1,548 @@
+// https://community.topcoder.com/stat?c=problem_statement&pm=12950%0A%0Aimport java.util.Set;%0Aimport java.util.HashSet;%0A%0Apublic class AlienAndPassword %7B%0A%09public static int getNumber(String S) %7B%0A%09%09if (S.length() == 1) %7B%0A%09%09%09return 1;%0A%09%09%7D%0A%09%09%0A%09%09Set%3CString%3E differentPasswords = new HashSet%3CString%3E();%0A%09%09StringBuilder password = new StringBuilder(S);%0A%09%09%0A%09%09for (int i = 0; i %3C S.length(); ++i) %7B%0A%09%09%09password.deleteCharAt(i);%0A%09%09%09differentPasswords.add(password.toString());%0A%09%09%09password = new StringBuilder(S);%0A%09%09%7D%0A%09%09%0A%09%09return differentPasswords.size();%0A%09%7D%0A%7D%0A

Create AlienAndPassword.java