先/中/后序遍历

二叉树

  先序遍历

    根→左→右

    (1 2 4 7 5 3 6 8 9)

  中序遍历

    左→根→右

    (7 4 2 5 1 3 8 6 9)

  后序遍历

    左→右→根

    (7 4 5 2 8 9 6 3 1)

 

  

作者:tyqEmptySet
原文地址:https://www.cnblogs.com/tyqEmptySet/p/10660674.html