[BASIC] : 전위(pre) 중위(in) 후위(post) 순회(Order) 예시 코드 작성#136
Merged
programofktw merged 2 commits intomainfrom Jul 9, 2025
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#️⃣ 어떤 브랜치인가요?
📝 문제 설명 (Describe)
전위, 중위, 후위 순회의 구현
단순히 Tree를 순회하는 알고리즘이지만 해당 코드의 구현 방식을 통해 재귀적 문제 해결을 방식에서 언제 본인의 문제를 처리하느냐를 구분하는 방법입니다.
특정 문제를 작은 문제로 나누어 문제 해결을 수행할 때 특정 문제를 언제 처리해야할 지에 따른 프로그래밍 방법을 정립하는
방식입니다.
전위(현재 문제를 먼저 처리한 후, 작은 문제를 해결하는 방식)
작은 두 문제를 해결하기 전 본인의 문제를 해결해야하는 경우
중위 문제(왼쪽 문제를 해결한 후, 현재 문제를 처리하고, 마지막으로 오른쪽 문제를 해결하는 방식)
작은 문제를 해결하기 전 특정 부분을 해결하고 본인 문제 특정 부분 이후 문제를 해결해야하는 경우
후위 문제(작은 문제들을 모두 해결한 후, 현재 문제를 마지막에 처리하는 방식)
작은 문제 두개를 해결하고 난 후 본인의 문제를 해결해야하는 경우