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
|
1774 Discussions
|
Please Login in order to post a comment
public class Solution {
for(int i=0;i
Arrays.sort(nstr); System.out.println(nstr[0]); System.out.println(nstr[n-len]); }
public static String getSmallestAndLargest(String s, int k) { String smallest = ""; String largest = "";
Simple solution
import java.util.stream.Collectors; import java.util.stream.IntStream;
public class Solution { public static String getSmallestAndLargest(String s, int k) {