From d9ecd7947faa18383305fec1e97cff0f383d0de9 Mon Sep 17 00:00:00 2001 From: Habin Song <83588265+boulce@users.noreply.github.com> Date: Sat, 4 May 2024 20:07:21 +0900 Subject: [PATCH] typo: Update LCA(Lowest Common Ancestor).md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 코드 들여쓰기를 수정하였습니다 --- Algorithm/LCA(Lowest Common Ancestor).md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Algorithm/LCA(Lowest Common Ancestor).md b/Algorithm/LCA(Lowest Common Ancestor).md index ce236b52..0e6612ff 100644 --- a/Algorithm/LCA(Lowest Common Ancestor).md +++ b/Algorithm/LCA(Lowest Common Ancestor).md @@ -41,12 +41,12 @@ int parent[] = {0, 1, 1, 2, 2, 3, 3} while(true){ if(depth가 일치) if(두 정점의 parent 일치?) LCA 찾음(종료) - else 두 정점을 자신의 parent 정점 값으로 변경 - else // depth 불일치 - 더 depth가 깊은 정점을 해당 정점의 parent 정점으로 변경(depth가 감소됨) + else 두 정점을 자신의 parent 정점 값으로 변경 + else // depth 불일치 + 더 depth가 깊은 정점을 해당 정점의 parent 정점으로 변경(depth가 감소됨) } ```
-트리 문제에서 공통 조상을 찾아야하는 문제나, 정점과 정점 사이의 이동거리 또는 방문경로를 저장해야 할 경우 사용하면 된다. \ No newline at end of file +트리 문제에서 공통 조상을 찾아야하는 문제나, 정점과 정점 사이의 이동거리 또는 방문경로를 저장해야 할 경우 사용하면 된다.