[250313 TIL] 뭔가 많이 쓸 것 같은 어댑터 패턴

·
TIL
1️⃣ C++ 코딩테스트 공부💡스택은 언제 사용할까?- 근처에 있는 것들끼리 관련 있을 때- 순서 reverse 해야할 때🔹괄호 짝 맞추기더보기더보기#include #include using namespace std;bool solution(string s) { bool answer; stack st; for(char ch : s) { //if(ch == ')' && st.top() == '(') || )가 나왔는데 스택이 비어있을 경우 생각못함 if(ch == ')') { if(st.top() == '(') { st.pop(); continue; ..