You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
사실 이것들은 너무나도 잘알려진 자료구조들과 잘알려진 메서드라 상관없는데 보통 undefined나 null을 반환할 때는 메서드 네이밍에 OrNull같은 것들을 포함시켜주면 가독성이 좋아지긴합니다. 주석보다 더 나은 방법이죠. 하지만 알고리즘 문제에서는 패스하셔도 됩니다.
브랜치를 분기할 때 업스트림 브랜치를 기준으로 분기했어야 했는데, 그렇지 않아서 생긴 문제인 듯합니다. 조언 감사합니다.
전반적으로 로직 구현은 훌륭합니다. 다만 타입스크립트로 작성하셨으면 좀 더 좋지 않았나 생각합니다. 특히 노드가 포함된 이런 문제들은 null을 옵셔널하게 반환할 수도 있잖아요? 그러면 return type이 명시되어있는게 보통 본인을 위해서도 편하죠.
단순 알고리즘 구현은 TypeScript가 필요 없을 거라고 생각했는데, 그런 장점이 있었네요. 도움이 되었습니다.
사실 이것들은 너무나도 잘알려진 자료구조들과 잘알려진 메서드라 상관없는데 보통 undefined나 null을 반환할 때는 메서드 네이밍에 OrNull같은 것들을 포함시켜주면 가독성이 좋아지긴합니다. 주석보다 더 나은 방법이죠. 하지만 알고리즘 문제에서는 패스하셔도 됩니다.
메서드 네이밍에 반환값을 포함하는 컨벤션은 처음 봤는데, 확실히 가독성에 좋은 네이밍 컨벤션인 것 같습니다. 감사합니다.
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
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.
요구사항
다음 자료 구조를 구현해 algorithm 폴더에 저장해 주세요.
다음 알고리즘을 JavaScript로 구현해 algorithm/sorts.js 파일에 추가로 작성해 주세요.