본문 바로가기

전체 글

(12)
[Leetcode][Python] 114. Flatten Binary Tree to Linked List 리트코드 / 파이썬 / 114. Flatten Binary Tree to Linked List leetcode.com/problems/flatten-binary-tree-to-linked-list/ Flatten Binary Tree to Linked List - 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 문제 풀이 주어진 Binary Tree를 오른쪽과 같이 Flatten한다. 1 1 / \ \ 2 5 2 / \ \ \ 3 4 6 3 \ 4 \ 5 \ 6 ..
[Leetcode][Python] 98. Validate Binary Search Tree 리트코드 / 파이썬 / 98. Validate Binary Search Tree leetcode.com/problems/validate-binary-search-tree/ Validate Binary Search Tree - 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 문제 풀이 입력 받은 Binary Search Tree의 valid 여부를 출력하는 문제다. root의 모든 left node들은 root보다 작아야 하고, root의 모든 right node들..
[Leetcode][Python] 91. Decode Ways 리트코드 / 파이썬 / 91. Decode Ways leetcode.com/problems/decode-ways/ Decode Ways - 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 풀이 방법 * Example 2: Input: s = "226" Output: 3 Explanation: It could be decoded as "BZ" (2 26), "VF" (22 6), or "BBF" (2 2 6). 0~9까지의 숫자로 구성된 string을 받고, A~Z..