loading...
re: why not just this public static boolean isPalindrome(String str) { return str.equals(new StringBuilder(str).reverse().toString()); }
 

You are using Java's in built reverse method. Normally in an interview, you create your own algorithm i.e. your own implementation of reverse method.

 

Oh OK these post are like examples for juniors when doing interview and stuff

code of conduct - report abuse