Driver code
public static void main ( String [ ] args ) { String str = " acaba " ; int n = str . length ( ) ; if ( isSatisfied ( str . toCharArray ( ) , n ) ) System . out . println ( " Yes " ) ; else System . out . println ( " No " ) ; } }