Skip to content

Commit 0518c0a

Browse files
committed
binary-tree-maximum-path-sum fix annot on time complexity
1 parent c67b692 commit 0518c0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

β€Žbinary-tree-maximum-path-sum/jdy8739.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ var maxPathSum = function(root) {
3333
};
3434

3535
// μ‹œκ°„λ³΅μž‘λ„ O(n) -> 트리의 λͺ¨λ“  λ…Έλ“œλ₯Ό μž¬κ·€μ μœΌλ‘œ νƒμƒ‰ν•˜λ―€λ‘œ λ³΅μž‘λ„λŠ” λ…Έλ“œμ˜ μˆ˜μ™€ 비둀함
36-
// κ³΅κ°„λ³΅μž‘λ„ O(1) -> μž…λ ₯된 νŠΈλ¦¬μ™€ κ΄€λ ¨ν•˜μ—¬ νŠΉλ³„ν•˜κ²Œ μ‚¬μš©λ˜λŠ” λ°°μ—΄μ΄λ‚˜ 객체가 μ—†μŒ
36+
// κ³΅κ°„λ³΅μž‘λ„ O(h) -> μž…λ ₯된 트리의 μ΅œλŒ€ λ†’μ΄λ§ŒνΌ μž¬κ·€ μŠ€νƒμ΄ μŒ“μ΄λ―€λ‘œ κ³΅κ°„λ³΅μž‘λ„λŠ” 트리의 높이와 κ°™μŒ

0 commit comments

Comments
Β (0)