// inorder and postorder consist of unique values. // Each value of postorder also appears in inorder. // inorder is guaranteed to be the inorder traversal of the tree. // postorder is guaranteed to ...
You may assume that duplicates do not exist in the tree. See 'Construct tree from inorder + postorder' as example. This problem uses divide and conquer idea as well. For preorder: the front node is ...
バイナリツリーの走査方法に関するまとめ第2弾です。 バイナリツリーについて別で2本記事を書いています。 走査とは先頭から順にデータを見ていくことを指し、バイナリツリーを走査するアルゴリズムは主に4つあります。 このうちのIn-order Traversalに ...