Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
Tags
- two pointers
- DP
- hash table
- Array
- 이진트리
- Python
- tree
- 중간
- matrix
- linked list
- math
- 미디움
- 재귀
- dfs
- Medium
- 쉬움
- 문자열
- recursive
- string
- easy
- binary search
- HashTable
- sorting
- leetcode
- Depth-first Search
- list
- binary tree
- Binary
- backtracking
- 리트코드
Archives
- Today
- Total
목록Valid Parentheses (1)
부부의 코딩 성장 일기
LeetCode 20(Valid Parentheses, Python)
1. 문제 링크 https://leetcode.com/problems/valid-parentheses/ 2. 문제 설명 (){}[]로만 구성된 string이 주어졌을 때 아래 3가지 요건을 다 만족하는지 판단 - True or False 반환 열린 괄호 ( { ] 는 같은 유형의 괄호에 의해 닫혀야 한다. 열린 괄호는 올바른 순서로 닫혀야 한다. 각 닫는 괄호는 동일 유형의 열린 괄호와 대응해야 한다. 예시) "()" true, "()[]{}" true, "(]" false 3. 처음 풀이 true인 string은 무조건 [], {}, () 중 하나의형태를 포함하고 있다. 단순하게 열고 닫는 괄호 이웃한 것을 한 쌍 한쌍 삭제하는 구조 class Solution: def isValid(self, s: s..
Algorithm/LeetCode
2023. 11. 1. 19:00