https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/description/ 주어진 트리에서 두개의 target 노드 중, 가장 낮은 위치의 공통 부모 노드를 찾아라. 특정 노드간의 경로를 우선 기록한다. 그리고 두 노드 경로를 비교해서 달라지기 시작하면, 그 바로 직전 노드가 가장 낮은 공통 부모다. 코드.더보기bool collectPathToNode(TreeNode* node, TreeNode* target, vector& vBuff){ if (node == nullptr) return false; vBuff.push_back(node); if (node == target) ..