Skip to content

Instantly share code, notes, and snippets.

View abhinit21's full-sized avatar
👋
Hello!

Sura Karthikeya abhinit21

👋
Hello!
View GitHub Profile
import java.util.Scanner;
public class Solution {
public static String getSmallestAndLargest(String s, int k) {
String smallest = "";
String largest = "";
smallest = largest = s.substring(0,k);
// "Compare to" method doesn't turn just the equel case it also turns a value.
for(int i=0; i<=s.length()-k+1; i++ ){