class Parenthesis { public: bool chkParenthesis(string A, int n) { // write code here stack<char> heap; for (int i = 0; i < n; i ++) { if (A[i] == '(') { heap.push(A[i]); } else if (A[i] == '...