Driver Code
$ X = str_split ( " [ ( ) ] ( ) " ) ; $ n = 6 ; if ( isBalanced ( $ X , $ n ) ) echo ( " Yes STRNEWLINE " ) ; else echo ( " No STRNEWLINE " ) ; $ Y = str_split ( " [ [ ( ) ] ] ) " ) ; $ n = 7 ; if ( isBalanced ( $ Y , $ n ) ) echo ( " Yes STRNEWLINE " ) ; else echo ( " No STRNEWLINE " ) ; ? >