-
Notifications
You must be signed in to change notification settings - Fork 126
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
[GangBean] Week 8 #969
[GangBean] Week 8 #969
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
반복문 풀이 잘 보았습니다! 해당 문제는 백트랙킹으로도 풀 수 있어서 시간이 되신다면 백트랙킹으로 문제 풀이도 도전해 보시면 너무 좋을것 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
head의 노드들을 모두 List에 옮긴 뒤 역순으로 재구성 하는 방법을 사용하셨네요!
해당 문제는 LinkedList의 특성 중 하나인 현재 노드가 다음 노드를 가리키는 포인터를 가지고 있다.
0 -> 0 -> 0 -> .... 를 활용하여
0 <- o <- 0 <-.... 와 같은 방식으로 풀이를 하는게 정석이라 생각이 됩니다!
문제 특성을 이해하기 전에는 어려우실 수 있으니 저같은 경우에는 해설을 먼저 보고 이해 한 뒤 이해했네요.
제가 말씀 대로 풀이 하시면 TC: O(n), SC: O(1) 으로 문제를 풀이 하실 수 있을겁니다.
이 문제는 꼭 다시 확인 해 보셨으면 좋겠어요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
전체 배열을 1로 초기화 한 후 진행하는 방식이 좋은 접근법 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8주차 문제 풀이 고생 하셨습니다.
6,7,8주 문제들 모두 보시느라 머리 많이 아프셨을텐데 올려주셔서 너무 감사드립니다.
전 특히나 ReverseLinkedList 문제를 꼭 다시 풀어보셨으면 좋겠어요!
9주차 문제 풀이도 파이팅입니다. 이제 얼마 안남았어요!
답안 제출 문제
6주차
7주차
8주차
체크 리스트
In Review
로 설정해주세요.