Driver Code
public static void Main ( ) { char [ ] X = " [ ( ) ] ( ) " . ToCharArray ( ) ; int n = 6 ; if ( isBalanced ( X , n ) ) Console . Write ( " Yes STRNEWLINE " ) ; else Console . Write ( " No STRNEWLINE " ) ; char [ ] Y = " [ [ ( ) ] ] ) " . ToCharArray ( ) ; n = 7 ; if ( isBalanced ( Y , n ) ) Console . Write ( " Yes STRNEWLINE " ) ; else Console . Write ( " No STRNEWLINE " ) ; } }