Skip to content

[전범주] Sprint Mission 13#290

Merged
chemonoworld merged 132 commits intocodeit-bootcamp-nodejs:algorithm-전범주from
intwocave:mission13
Feb 9, 2026
Merged

[전범주] Sprint Mission 13#290
chemonoworld merged 132 commits intocodeit-bootcamp-nodejs:algorithm-전범주from
intwocave:mission13

Conversation

@intwocave
Copy link
Collaborator

@intwocave intwocave commented Jan 25, 2026

요구사항

다음 자료 구조를 구현해 algorithm 폴더에 저장해 주세요.

  • 링크드 리스트 (Linked List)
  • 이중 링크드 리스트 (Doubly Linked List)
  • 큐 (Queue)
  • 스택 (Stack)
  • 이진 탐색 트리 (Binary Search Tree)

다음 알고리즘을 JavaScript로 구현해 algorithm/sorts.js 파일에 추가로 작성해 주세요.

  • 힙 정렬

@intwocave intwocave changed the title [전범주] Sprint Mission 12 [전범주] Sprint Mission 13 Jan 25, 2026
@chemonoworld
Copy link
Collaborator

마찬가지로 깔끔하게 체크아웃을 깔끔하게 하셔서 커밋정리해주시면 좋을 것 같아요.

// 큐가 비어 있는지 불린형으로 리턴
return this.items.length === 0;
}
} No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line


console.log("--- Heap Sort ---");
heapSort(nums);
console.log(nums); No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line

// 큐가 비어 있는지 불린형으로 리턴
return this.items.length === 0;
}
} No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line

@chemonoworld
Copy link
Collaborator

전반적으로 로직 구현은 훌륭합니다. 다만 타입스크립트로 작성하셨으면 좀 더 좋지 않았나 생각합니다. 특히 노드가 포함된 이런 문제들은 null을 옵셔널하게 반환할 수도 있잖아요? 그러면 return type이 명시되어있는게 보통 본인을 위해서도 편하죠.

@chemonoworld
Copy link
Collaborator

chemonoworld commented Feb 9, 2026

사실 이것들은 너무나도 잘알려진 자료구조들과 잘알려진 메서드라 상관없는데 보통 undefined나 null을 반환할 때는 메서드 네이밍에 OrNull같은 것들을 포함시켜주면 가독성이 좋아지긴합니다. 주석보다 더 나은 방법이죠. 하지만 알고리즘 문제에서는 패스하셔도 됩니다.

@chemonoworld chemonoworld merged commit af9ed6b into codeit-bootcamp-nodejs:algorithm-전범주 Feb 9, 2026
1 of 2 checks passed
@intwocave
Copy link
Collaborator Author

마찬가지로 깔끔하게 체크아웃을 깔끔하게 하셔서 커밋정리해주시면 좋을 것 같아요.

브랜치를 분기할 때 업스트림 브랜치를 기준으로 분기했어야 했는데, 그렇지 않아서 생긴 문제인 듯합니다. 조언 감사합니다.

전반적으로 로직 구현은 훌륭합니다. 다만 타입스크립트로 작성하셨으면 좀 더 좋지 않았나 생각합니다. 특히 노드가 포함된 이런 문제들은 null을 옵셔널하게 반환할 수도 있잖아요? 그러면 return type이 명시되어있는게 보통 본인을 위해서도 편하죠.

단순 알고리즘 구현은 TypeScript가 필요 없을 거라고 생각했는데, 그런 장점이 있었네요. 도움이 되었습니다.

사실 이것들은 너무나도 잘알려진 자료구조들과 잘알려진 메서드라 상관없는데 보통 undefined나 null을 반환할 때는 메서드 네이밍에 OrNull같은 것들을 포함시켜주면 가독성이 좋아지긴합니다. 주석보다 더 나은 방법이죠. 하지만 알고리즘 문제에서는 패스하셔도 됩니다.

메서드 네이밍에 반환값을 포함하는 컨벤션은 처음 봤는데, 확실히 가독성에 좋은 네이밍 컨벤션인 것 같습니다. 감사합니다.

@intwocave intwocave deleted the mission13 branch February 9, 2026 03:30
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

Successfully merging this pull request may close these issues.

2 participants