#include <unordered_map> class Solution { public: /** * * @param s string字符串 * @return bool布尔型 */ bool isValid(string s) { stack<int> st; unordered_map<char, char> hash = {{'[', ']'}, {'{', '}'}, {'(', ')'}}; for (auto &c: s) { ...