Driver Code
public static void main ( String [ ] args ) { String S1 = " cabbba " , S2 = " abbccc " ; if ( sameStrings ( S1 , S2 ) ) System . out . print ( " YES " + "NEW_LINE"); else System . out . print ( " ▁ NO " + "NEW_LINE"); } }