PPK(outdated)
return str.charAt(0) + "*" + allStar(str.substring(1));
5. Given a string, compute recursively a new string where identical chars
that are adjacent in the original string are separated from each other by a
"*".
if (str.length()<2) return str;
if(str.charAt(0)==str.charAt(1)) return str.charAt(0) + "*" +
pairStar(str.substring(1));
return str.charAt(0) + pairStar(str.substring(1));
10. We'll say that a "pair" in a string is two instances of a char
separated by a char. countPairs("axa") → 1
if(str.length() < 3) return 0;
if(str.charAt(0)==str.charAt(2)) return 1 + countPairs(str.substring(1));
return countPairs(str.substring(1));
11. Put certain letter in the end of given string
if(str.length()==1 || str.equals("")) return str;
if(str.charAt(0)=='x') return endX(str.substring(1)) + "x";
return str.charAt(0) + endX(str.substring(1));
12. Given a string that contains a single pair of parenthesis,