Driver code
public static void main ( String [ ] args ) { int k = 2 ; String st = " geeksforgeeks " ; String ans = reduced_String ( k , st ) ; System . out . println ( ans ) ; } static class Pair { char c ; int ctr ; Pair ( char c , int ctr ) { this . c = c ; this . ctr = ctr ; } } }