Hackerrank Hackerrank Java Substring Comparisons Solution Solution in java8Approach 1. public static String getSmallestAndLargest(String s, int k)