diff --git "a/Programmers/\354\230\254\353\260\224\353\245\270_\352\264\204\355\230\270.cpp" "b/Programmers/\354\230\254\353\260\224\353\245\270_\352\264\204\355\230\270.cpp" new file mode 100644 index 0000000..e51ff77 --- /dev/null +++ "b/Programmers/\354\230\254\353\260\224\353\245\270_\352\264\204\355\230\270.cpp" @@ -0,0 +1,23 @@ +#include +#include +#include + +using namespace std; + +bool solution(string s) { + stack st; + + for (char c : s) { + if (c == '(') { + st.push(c); + } else { + if (st.empty()) { + return false; + } + st.pop(); + } + + } + + return st.empty(); +} \ No newline at end of file