Driver code .
public static void Main ( String [ ] args ) { String s1 = " ) ( ) ( ( ) ) ) ) " ; String s2 = " ( ( ) ( ( ) ( " ; if ( isBalancedSeq ( s1 , s2 ) ) { Console . WriteLine ( " Balanced " ) ; } else { Console . WriteLine ( " Not ▁ Balanced " ) ; } } }