Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

16장 트라이 473쪽 질문있습니다. #40

Closed
HxH2H opened this issue Oct 20, 2020 · 2 comments
Closed

16장 트라이 473쪽 질문있습니다. #40

HxH2H opened this issue Oct 20, 2020 · 2 comments

Comments

@HxH2H
Copy link

HxH2H commented Oct 20, 2020

단업 삽입 부분 코드에서 node.val = char 라는 부분이 있습니다. 그런데 트라이를 저장할 노드 부분에서는 val을 정의하고 있지 않아 의문이 들었습니다. 그래서 제가 직접 node.val = char 부분을 제거하고 실행한 결과 오류없이 잘 실행되는 것도 확인했습니다.
혹시나 제가 놓친 부분이 있는지 있다면 어떤 부분인지 설명을 듣고 싶어서 글을 남겼습니다.

@likejazz
Copy link
Collaborator

네, 코드를 구현하는 과정에서 노드의 값을 보관하기 위해 .val을 만들어 두었는데, 지금은 추가만 할뿐 정작 코드에서는 추출해서 쓰지는 않기 때문에 현재는 필요가 없습니다. 오류가 발생하지는 않지만 쓰이는 값은 아니기 때문에 삭제하도록 하겠습니다. 알려주셔서 감사합니다.

likejazz added a commit that referenced this issue Oct 21, 2020
@HxH2H
Copy link
Author

HxH2H commented Oct 21, 2020

답변 감사합니다!

@HxH2H HxH2H closed this as completed Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants