Skip to content

Conversation

oyeong011
Copy link
Contributor

@oyeong011 oyeong011 commented Dec 6, 2024

답안 제출 문제

체크 리스트

  • PR을 프로젝트에 추가하고 Week를 현재 주차로 설정해주세요.
  • 바로 앞에 PR을 열어주신 분을 코드 검토자로 지정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 Status를 In Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

@oyeong011 oyeong011 requested a review from hanseulhee December 6, 2024 02:38
@oyeong011 oyeong011 requested a review from a team as a code owner December 6, 2024 02:38
@github-actions github-actions bot added the c++ label Dec 6, 2024
@obzva
Copy link
Contributor

obzva commented Dec 6, 2024

Project의 주차 설정 부탁 드립니다
image

Comment on lines 3 to 20
int longestConsecutive(vector<int>& nums) {
const int INF = 987654321;
int temp = INF, ret = 0, cur = 0;

sort(nums.begin(), nums.end());
for(int a : nums){
if(a == temp)continue;
if(temp == INF || temp + 1 == a){
cur++; temp = a;
} else {
ret = max(ret, cur);
cur = 1;
temp = a;
}
}
ret = max(ret, cur);
return ret;
}
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 Author

Choose a reason for hiding this comment

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

넵 수정했습니다!

@oyeong011 oyeong011 requested a review from EgonD3V December 8, 2024 15:15
@obzva
Copy link
Contributor

obzva commented Dec 10, 2024

아직 제출까지 시간이 많이 남았으니 Big O 분석도 적어주시면 더 좋을 것 같습니다 :)

@EgonD3V EgonD3V self-requested a review December 14, 2024 05:27
@EgonD3V EgonD3V merged commit df8b9f5 into DaleStudy:main Dec 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

3 participants