LeetCode 筆記 - 1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree
題目在此 1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree
給兩個 Binary Tree 一棵樹是另一顆的複製,還有 target node
請回傳 target node 在複製樹上的 reference
解題思維
很單純就是 Tree traversal
跑完一次就解決了
程式碼
1 | # Definition for a binary tree node. |