Reverse the substring starting after the last encountered opening bracket till the current character
else if ( str [ i ] == ' ) ' ) { char [ ] A = str . ToCharArray ( ) ; reverse ( A , st . Peek ( ) + 1 , i ) ; str = new string ( A ) ; st . Pop ( ) ; } }