Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
プレオーダートラバーサルの定義を知っていますが、ツリーのクローン作成にプレオーダートラバーサル戦略が好まれる理由を理解したいですか?順序トラバーサルや事後トラバーサルのような他のトラバーサルメカニズムよりも優先されるのはなぜですか?
子を作成するには、親(ルート)も作成する必要があります。プレオーダーは、インオーダーやポストオーダーとは異なり、親を渡す前に子をトラバースしない唯一のオーダーです。