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

[Jeehay28] WEEK 05 #858

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

[Jeehay28] WEEK 05 #858

wants to merge 2 commits into from

Conversation

Jeehay28
Copy link
Contributor

@Jeehay28 Jeehay28 commented Jan 6, 2025

답안 제출 문제

체크 리스트

  • 우측 메뉴에서 PR을 Projects에 추가해주세요.
  • Projects의 오른쪽 버튼(▼)을 눌러 확장한 뒤, Week를 현재 주차로 설정해주세요.
  • 바로 앞에 PR을 열어주신 분을 코드 검토자로 지정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 StatusIn Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

@Jeehay28 Jeehay28 requested a review from a team as a code owner January 6, 2025 12:22
@github-actions github-actions bot added the js label Jan 6, 2025
@Jeehay28 Jeehay28 requested a review from ekgns33 January 6, 2025 12:23
// let obj = {};

// for (const str of strs) {
// const key = sorted(str);
Copy link
Contributor

Choose a reason for hiding this comment

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

lower-case alphabet 만 입력으로 주어지기 때문에 sort를 했을 때 같은 anagram이라면 같은 키임을 활용하셨군요! 👍

const arr = new Array(26).fill(0);

for (const ch of str) {
const idx = ch.charCodeAt() - "a".charCodeAt();
Copy link
Contributor

Choose a reason for hiding this comment

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

알파벳만 사용할때 유용한 것 같습니다! js에서는 charCodeAt이라는 메소드로 형변환을 해줘야하나요? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

charCodeAt()은 문자열에서 특정 문자의 Unicode 값을 숫자로 반환하는 메소드입니다.
문자를 숫자로 바꾸는 역할을 해서 형변환이라고 생각할 수 있지만, 이보다는 문자 코드 값을 읽는 메소드라고 생각하시면 좋을 것 같습니다.

return profitMax;
};

// Why Constants Are Ignored in Big-O
Copy link
Contributor

Choose a reason for hiding this comment

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

빅O 노테이션에 대해서 정리해주셨군요 감사합니다 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Solving
Development

Successfully merging this pull request may close these issues.

2 participants