每日一題3.11.2

每日一題3.11.2 題目描述:合法括號序的判斷 **解題思路:**用一個left變量++ 和 - - 來監測左右括號,遇左括號++,遇右括號–,而且遇到右括號時left不能小於0. 代碼實現: #include<iostream> #include<string> using namespace std; class Parenthesis { public: bool chkParenthe
相關文章
相關標籤/搜索