20
-
[LeetCode] 20. Valid ParenthesesLeetCode 2021. 11. 9. 17:07
https://leetcode.com/problems/valid-parentheses/ Valid Parentheses - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Valid Parentheses - Easy 괄호들이 순서대로 열리고 닫혔는지 판단하는 문제. stack을 만들어 여는 괄호가 나오면 닫는 괄호를 stack에 넣어준다. 닫는 괄호가 나오면 stack의 사이즈를 체크한뒤 stack의 top이 그 괄호와 같은지 체크한다. 사이즈가 있고 같다면 po..