Preorder

  • Visit the root.
  • Visit the left-subtree.
  • Visit the right-subtree.

Inorder

  • Visit the left-subtree.
  • Visit the root.
  • Visit the right-subtree.

Postorder

  • Visit the right-subtree.
  • Visit the left-subtree.
  • Visit the root.

Breadth First Search(BFS) or Level order traversals

  • starts at the tree root and explores the neighbor nodes first, before moving to the next level neighbors.

Depth First Search(DFS)

예시


'공부 > 자료구조' 카테고리의 다른 글

Sorting (Heap, Quick, Merge Sort)  (0) 2018.09.30
Sorting (Bubble, Selection, Insertion Sort)  (0) 2018.09.30
트리 탐색 방법 (Tree traversal)  (0) 2018.09.28
Spanning Tree (Prim 알고리즘, Kruskal 알고리즘, Dijkstra 알고리즘)  (0) 2018.09.26
Graph  (0) 2018.09.26
AVL Tree  (0) 2018.08.17

+ Recent posts