-
-
Notifications
You must be signed in to change notification settings - Fork 195
[Evan] Week 2 Solutions #59
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
Conversation
Runtime: 53 ms, faster than 94.85% of JavaScript online submissions for Linked List Cycle. Memory Usage: 52.7 MB, less than 80.49% of JavaScript online submissions for Linked List Cycle.
Runtime: 52 ms, faster than 87.95% of JavaScript online submissions for Reverse Linked List. Memory Usage: 52 MB, less than 37.51% of JavaScript online submissions for Reverse Linked List.
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.
수고하셨어요~
저는 몇몇 풀이들을 재귀호출을 이용해서 해결했는데 깔끔해서 기분이 좋더라구요 ㅋㅋㅋ 여유있으시면 한 번 해보셔도 좋을 것 같아요~
fastPointer = fastPointer?.next?.next; | ||
slowPointer = slowPointer?.next; |
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.
JS
은 ?.
연산자 통해서 깔끔하게 적을 수 있네요 👍
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.
네네ㅎㅎ Optional chaining이라는 연산자입니다. 비교적 최근에 나온 스펙이죠...
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.
시간이 되신다면 다음에는 시간 복잡도 공간 복잡도도 추가해주시면 좋을 것 같습니다. 고생하셨습니다!
No description provided.