We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
(i wrote this program and i don't knw, what the problem is, but it is running properly with the correct output and hacker rank is giving some test case errors)
import java.io.;
import java.util.;
public class Solution {
public static boolean isPalindrome(String str){
str = str.replaceAll("\s", "").toLowerCase();
int left = 0;
int right = str.length()-1;
Java String Reverse
You are viewing a single comment's thread. Return to all comments →
(i wrote this program and i don't knw, what the problem is, but it is running properly with the correct output and hacker rank is giving some test case errors) import java.io.; import java.util.;
public class Solution { public static boolean isPalindrome(String str){ str = str.replaceAll("\s", "").toLowerCase(); int left = 0; int right = str.length()-1;
}