Skip to content

[dohyeon2] WEEK 1 Solutions#2349

Open
dohyeon2 wants to merge 9 commits intoDaleStudy:mainfrom
dohyeon2:week1
Open

[dohyeon2] WEEK 1 Solutions#2349
dohyeon2 wants to merge 9 commits intoDaleStudy:mainfrom
dohyeon2:week1

Conversation

@dohyeon2
Copy link

@dohyeon2 dohyeon2 commented Feb 28, 2026

답안 제출 문제

작성자 체크 리스트

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

검토자 체크 리스트

Important

본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!

  • 바로 이전에 올라온 PR에 본인을 코드 리뷰어로 추가해주세요.
  • 본인이 검토해야하는 PR의 답안 코드에 피드백을 주세요.
  • 토요일 전까지 PR을 병합할 수 있도록 승인해주세요.

@dohyeon2
Copy link
Author

dohyeon2 commented Mar 1, 2026

  1. 원래 자바스크립트 및 타입스크립트를 주력으로 코드를 작성하나, 자바에 대한 수요도 높은 것 같아 새롭게 공부하고 있습니다. 많이 가르쳐주시면 감사하겠습니다.
  2. 영어를 잘 하지 못하는데, 해당 부분도 배워나가고자 합니다. 이 또한 많이 가르쳐주시면 감사하겠습니다.

@SamTheKorean SamTheKorean self-requested a review March 1, 2026 23:29
Copy link
Contributor

Choose a reason for hiding this comment

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

worst case 시간 복잡도에 대해서 생각해본적이 없었는데 리뷰하면서 공부할 기회가 되었습니다!

// This solution was inspired by:
// https://www.algodale.com/problems/longest-consecutive-sequence/
//
// I initially believed this algorithm would run in O(n) time,
Copy link
Contributor

Choose a reason for hiding this comment

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

사고흐름을 상세하게 기술해놓는 것 정말 좋은 것 같습니다!

Copy link
Contributor

@SamTheKorean SamTheKorean left a comment

Choose a reason for hiding this comment

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

다섯 문제나 정말 상세하게 정리해주셔서 리뷰하면서 저도 공부가 되는 부분이 많았습니다! 고생많으셨습니다!


// The Set has O(n) space complexity,
// because it may store up to n elements in memory.
// Is this the correct way to evaluate space complexity?
Copy link
Contributor

Choose a reason for hiding this comment

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

넵! 지금 분석하신 것처럼 주어진 것에서 추가적으로 사용된 공간에 대해서 분석하시면 됩니다!

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM!

class Solution {
public int[] twoSum(int[] nums, int target) {
// Approach : using HashMap to get index with the element in O(n) time
// complexity
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick : 이부분은 time complexity 라고 명시해주는게 정확할 것 같습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

2 participants