If characters of string are opening braces then append them in a list
for ( int i = 0 ; i < String . Length ; i ++ ) { if ( Array . Exists ( lst1 , element => element == String [ i ] ) ) { lst . Add ( String [ i ] ) ; k = i + 2 ; } else {