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.
- All Contests
- HourRank 25
- Maximum Palindromes
- Discussions
Maximum Palindromes
Maximum Palindromes
Sort by
recency
|
21 Discussions
|
Please Login in order to post a comment
1.can anybody tell why m i failing with some test cases.
-
For me last five test cases are showing run time errors. And remaining are working well Can anyone see and tell the mistake what i have done import java.io.; import java.util.; import java.text.; import java.math.; import java.util.regex.*;
public class Solution {
static String str; static BigInteger[] fact=new BigInteger[101]; static void initialize(String s) { // This function is called once before all queries. str=s; fact[0]=new BigInteger("1"); for(int i=1;i<101;i++) { fact[i]=new BigInteger(""+i); fact[i]=fact[i].multiply(fact[i-1]); // System.out.println(fact[i]); }
}
cnt[i][j] += cnt[i - 1][j]; in this line what happen when i=0; cnt[0][j]+=cnt[-1][j] as it has a index -1 does it make any sence
it is a editorial solution
could someone tell me, why do we need inverses of factorial...also what is mistake in my code..pls. Code in GFG IDE
https://www.youtube.com/watch?v=cJsNNcQlSPA https://youtu.be/_bRVA5b4sb4
This might help understand the editorial.