+ 2
Problem in code coach
Name of codecoach problem: Longest Common Substring My code is showing the correct output but still the test case is showing it is wrong Can someone help me find the bug in my code or is the test case given wrong My code: https://code.sololearn.com/ctDUFR5yC64n/?ref=app
11 Answers
+ 2
Hope this link helps you
https://code.sololearn.com/cxzxQvRrl8X2
+ 2
Shaurya Agarwal
In code coaches, check expected output with your output. There should match exactly..
Instead of using
words= input("Enter string: ").split(" ")
Try :
words= input().split()
+ 2
Shaurya Agarwal
CDAQ is the correct answer for test case. Observe again, all string contains CDAQ. So try again to find out mistake in your code.
print s instead of ls..
+ 1
Lamron no problem, thank you for considering my question
+ 1
Jayakrishna🇮🇳 I have tried that but still test case #2 is not matching
+ 1
Thank you all for your valuable time and help, my problem is solved
+ 1
darren slinger
You can ask in new thread, instead of others and unrelated to OP question..
Or use search option in q/a..
println() method appends a new line '\n' character after printing text. So pointer goes to next line. But print don't add newline.
0
What is the name of the code coach you're doing?
0
Longest Common Substring
0
Unfortunately I do not know how to do it yet, so you will have to wait for someone who's more experienced that can help 🙂
0
Im new here and im busy with the java assessments, completed the 1st category, yet im still not sure what the difference between print() and printIn() is