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.
Count Palindromes
Count Palindromes
Sort by
recency
|
10 Discussions
|
Please Login in order to post a comment
In editorial, please don't post uncommented code.... it's very difficult to understand uncommented complex code and leads to lots of waste of time.
Actually it does time out when using lists. Thank you for the suggestion. I also found that converting to array did not solve my problem. Dua for girlfriend
This is helpful. It is important to sum in tables separately before joining them. Thanks!
When I am running the program with the given test cases, I am getting an error in the main method rather than the solve method. When i run custom inputs and put in inputs like:
5 1 2 3 4 5
It always works for every value that I put inthe custom input, but gives me runtime errors with lots of test cases
Scanner sc=new Scanner(System.in); String a=sc.next(); String b; int l=a.length(); int c=0; for(int i=0;i=2 { String r=new StringBuffer(b).reverse().toString(); if(r.equals(b)) c++; } } } System.out.println(c) } }