資料結構›Ch5 樹狀結構第 15 題/共 48 題
15. Binary Tree、Preorder、Inorder、樹的還原
#DS-05-015中Binary TreePreorderInorder樹的還原
Write a pseudocode function that can re-construct a binary tree by using its preorder and inorder traversals. Please return the root of the binary tree as the output. Note: A node in a binary tree has two pointers, named 'left' and 'right', respectively, where the 'left' pointer is used to find the left child of the node and the 'right' pointer is used to find the right child.
📄 台大110
▤完整推導請見《WH 資工筆記 · 資料結構》Ch5 樹狀結構