Driver code
public static void main ( String [ ] args ) { String str = " geeksforgeeks " ; System . out . println ( " The ▁ input ▁ string ▁ is ▁ " + str ) ; int len = longestUniqueSubsttr ( str ) ; System . out . println ( " The ▁ length ▁ of ▁ the ▁ longest ▁ " + " non - repeating ▁ character ▁ " + " substring ▁ is ▁ " + len ) ; } }