https://hack.codingblocks.com/submission/1544459
on running the code given above i got wrong answer for two test cases .so i thought it is because of the identical substrings appering in arrayList so i removed identical substrings and tried code given below
https://hack.codingblocks.com/submission/1544521
but it is still failing at two test cases.
please help me with the problem
STRINGS-COUNT PALINDROMIC SUBSTRINGS,failing at two test cases
Hey @kirtidabas5
The links that you have provided can be accessed only by you as you have logged in from the ID. Please copy and save your code on online ide https://ide.codingblocks.com/ and then share the link here.
oh!!! sorry i didn’t know that
here,
https://ide.codingblocks.com/s/51518
https://ide.codingblocks.com/s/51517
Both the codes are wrong. They count some repetitive cases, thus increasing the count and giving wrong answer.
For example, for input: nittin, the output should be 9, which you can easily count. But your codes give larger count as repetitive cases are being considered.
Go through this code https://ide.codingblocks.com/s/51708
Understand the code and then try to code it yourself.
oh thanks a lot! i got it ,actually i was counting subsequences and not substrings.such a blunder