8000 Update 1167_1.cpp · andle7/basic-algo-lecture@0870fa7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0870fa7

Browse files
Update 1167_1.cpp
1 parent ef19cd1 commit 0870fa7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

0x19/solutions/1167_1.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,7 @@ int main(void) {
4646
dfs(1);
4747
cout << ans;
4848
}
49+
/*
50+
지름은 결국 한 점으로부터 가장 먼 두 자식까지의 거리의 합이 된다.
51+
dfs(x)는 x를 root로 하는 서브트리에서 가장 먼 자식까지의 거리를 반환한다.
52+
*/

0 commit comments

Comments
 (0)
0