목록2022/12/09 (1)
.Zzumbong

난이도 [ 🤔 ] Medium 문제 설명 Given the root of a binary tree, find the maximum value v for which there exist different nodes a and b where v = |a.val - b.val| and a is an ancestor of b. A node a is an ancestor of b if either: any child of a is equal to b or any child of a is an ancestor of b. 이진트리의 상위, 하위 노드의 a-b 의 최대값을 찾는 문제다. 입출력 예 Example 1: Input: root = [8,3,10,1,6,null,14,null,null,4,7,13] Outpu..
coding test/leetCode
2022. 12. 9. 10:48