+ 1

Longest Common Substring java

Again for the 10000th time, I believe the compiler is faulty.... of course I know am wrong. But for some reason, my code can't pass the 6th test on this code coach problem. https://code.sololearn.com/cBwl6Z70OxOU/?ref=app

11th Aug 2022, 2:52 PM
O'1
O'1 - avatar
7 Respuestas
+ 1
Initially you are taking substring of 2 characters by loop for(int j=I+2;.... Use j=i+1 only...
12th Aug 2022, 3:17 PM
Jayakrishna 🇮🇳
+ 1
Yes !! It works now Jayakrishna🇮🇳 thanks a lot
13th Aug 2022, 9:20 PM
O'1
O'1 - avatar
0
I guess : on single word input? It raising error.
11th Aug 2022, 3:50 PM
Jayakrishna 🇮🇳
0
No, it having issues printing multiple words
12th Aug 2022, 12:52 PM
O'1
O'1 - avatar
0
I've done that, still not working
13th Aug 2022, 5:14 PM
O'1
O'1 - avatar
0
O'1 I tested your code with that change i mentioned. It's working fine. so check again once.
13th Aug 2022, 5:48 PM
Jayakrishna 🇮🇳
0
You're welcome..
14th Aug 2022, 7:15 PM
Jayakrishna 🇮🇳