Algorithm Guidecomplexity: O(n)
트리 순회 (Tree Traversal)
트리의 모든 노드를 한 번씩 방문하는 방법입니다. 방문 시점에 따라 전위(루트 먼저)·중위(왼쪽→루트→오른쪽, BST에서 정렬 순)·후위(루트 마지막)·레벨 순회로 나뉩니다.
01 Explore How It Works
Interactive Step-by-StepHOVER OR SCROLL
Inorder Traversal
중위 순회(inorder)를 시작합니다. 왼쪽 서브트리 → 루트 → 오른쪽 순서로 방문하며, BST에서는 정렬된 순서로 출력됩니다.
Logic Node1 / 9
Live Python
02 Understand It Simply
For Everyone🔑Analogy
가계도를 정해진 순서로 빠짐없이 한 명씩 방문하는 것과 같습니다.
💡In Plain Words
트리의 모든 노드를 한 번씩 들르는 방법입니다.
루트를 언제 방문하느냐에 따라 전위·중위·후위로 나뉘고, BST를 중위로 돌면 정렬된 순서가 나와요.
📍Where It's Used
- –폴더 전체 출력
- –수식 계산(파스 트리)
- –트리 직렬화
03 Python Implementation
A clean, readable reference implementation of the core logic of 트리 순회 (Tree Traversal).
core_implementation.py
04 Frequently Asked Questions
FAQWhat is 트리 순회 (Tree Traversal)?+
트리의 모든 노드를 한 번씩 방문하는 방법입니다. 방문 시점에 따라 전위(루트 먼저)·중위(왼쪽→루트→오른쪽, BST에서 정렬 순)·후위(루트 마지막)·레벨 순회로 나뉩니다.
What is the time complexity of 트리 순회 (Tree Traversal)?+
The time complexity of 트리 순회 (Tree Traversal) is O(n). Follow the step-by-step visualization to see exactly why.
Where is 트리 순회 (Tree Traversal) used?+
폴더 전체 출력, 수식 계산(파스 트리), 트리 직렬화.
What's a simple analogy for 트리 순회 (Tree Traversal)?+
가계도를 정해진 순서로 빠짐없이 한 명씩 방문하는 것과 같습니다.
→ Trees — see allRelated
Guide Progress0%
