[Hyun] Week 8 Solution Explanation #153
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
230. Kth Smallest Element in a BST
Complexities π
Explanation π
μΌμͺ½ μμλ Έλ -> μμ -> μ€λ₯Έμͺ½ μμ λ Έλλ‘ μμ°¨ νμΈνλ λλμΌλ‘ μ κ·Όνμ¬ μ¬κ·μ μΌλ‘ μ²λ¦¬νμ΅λλ€.
105. Construct Binary Tree from Preorder and Inorder Traversal
Complexities π
Explanation π
κ½€λ μκ°μ μνλ λ¬Έμ μ¬μ μ¬λ°κ² νμμ΅λλ€ γ γ DaleSeoλμ κΈμ λ§μ΄ μ°Έκ³ νλ€μβΊοΈ
preorder: root -> left -> right
inorder: left -> root -> right
μ νΉμ±μ λ§κ² preorderμ 첫 λ²μ§Έ κ°μ΄ inorderμ μ΄λμ μμΉνλμ§μ λ°λΌμ leftμ right 리νλ Έλλ₯Ό μ²λ¦¬ν μ μμ΅λλ€. μ΄λ° νΉμ±μ ν΅ν΄ λ¬Έμ λ₯Ό μ¬κ·μ μΌλ‘ νμ΄νμ΅λλ€.
39. Combination Sum
Complexities π
Explanation π
λ°±νΈλνΉμ νμ©νμ¬ λ¬Έμ λ₯Ό νμ΄νμ΅λλ€.
79. Word Search
Complexities π
Explanation π
첫 λ¬Έμμ μμΉλ₯Ό νμ ν λ€ λ°±νΈλνΉμ μ¬μ©νμ¬ κ²½λ‘ νμμ μ§ννμ΅λλ€.
208. Implement Trie (Prefix Tree)
Complexities π
Explanation π