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.
- Prepare
- Java
- Strings
- Java Substring Comparisons
- Discussions
Java Substring Comparisons
Java Substring Comparisons
Sort by
recency
|
1721 Discussions
|
Please Login in order to post a comment
public class Solution {
}
does my code have any problem, it always failed to test case 3, however when i try the input of test case 3 as custom input, the output is correct.
Perfectly working, Logic is just that you need to keep checking all the substrings untill compateTo() function filters all the substrings lexographically.
}
import java.util.Scanner;
public class Solution {
}