Driver Code
public static void main ( String [ ] args ) { String str = " geeksforgeeks " ; if ( ifAllDistinct ( str ) ) System . out . print ( - 1 + "NEW_LINE"); else System . out . print ( findMinLength ( str . toCharArray ( ) ) ) ; } }