Driver Code
public static void main ( String [ ] args ) { String S = " abb ? xy ? " ; if ( nonDecreasing ( S . toCharArray ( ) ) == 1 ) System . out . print ( " Yes " + "NEW_LINE"); else System . out . print ( " No " + "NEW_LINE"); } }