Driver Code
public static void Main ( string [ ] args ) { string [ ] bracks = { " ) ( ) ) " , " ) " , " ( ( " , " ( ( " , " ( " , " ) " , " ) " } ; int num = bracks . Length ; Console . Write ( countPairs ( bracks , num ) ) ; } }