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
|
1727 Discussions
|
Please Login in order to post a comment
Solution using JAVA 8
This can be done without consuming extra space by maintaining an array/list
public static String getSmallestAndLargest(String s, int k){ String smallest = ""; String largest = "";
public static String getSmallestAndLargest(String s, int k) {