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

[jungsiroo] Week 7 #925

Merged
merged 6 commits into from
Jan 25, 2025
Merged

[jungsiroo] Week 7 #925

merged 6 commits into from
Jan 25, 2025

Conversation

jungsiroo
Copy link
Contributor

답안 제출 문제

체크 리스트

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

@jungsiroo jungsiroo self-assigned this Jan 19, 2025
@jungsiroo jungsiroo requested a review from a team as a code owner January 19, 2025 10:55
@github-actions github-actions bot added the py label Jan 19, 2025
Copy link
Contributor

@HC-kang HC-kang left a comment

Choose a reason for hiding this comment

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

@jungsiroo 님, 이번주도 고생하셨습니다~!
앞으로도 좋은 풀이 많이 올려주시면 좋겠네요!!

hash_map[ch] = end
answer = max(answer, end-begin+1)
else:
if begin<=hash_map[ch]<end: #중복이 생겼다.
Copy link
Contributor

Choose a reason for hiding this comment

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

< end 조건은 불필요해 보이는데 혹시 필요한 상황이 있을까요?

중복이 발생하고 begin과 end사이라면 중복 발생 원인 다음을 begin으로 세팅 후 다시 계산

Time Complexity : O(n)
Space Complexity : O(n)
Copy link
Contributor

Choose a reason for hiding this comment

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

이번에 리뷰하면서 문제를 다시 읽어봤는데, s의 길이와 더불어 카디널리티 조건도 있는것 같아요.
symbols가 과연 어디까지 나타내는걸까 싶기는 한데, 결과적으로 상수값이 되어 O(1)라고도 할 수 있지 않을까 싶네요

  • 문제의 조건: s consists of English letters, digits, symbols and spaces.

SC : O(1)
"""

return comb(m+n-2, m-1)
Copy link
Contributor

Choose a reason for hiding this comment

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

역시 파이썬의 편의성 최고네요 👍

matrix[i][j] = 0
"""

# Constant Space Complexity using bitmasking
Copy link
Contributor

Choose a reason for hiding this comment

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

와우,, 파이썬은 200비트 정수를 사용할수 있네요

@TonyKim9401 TonyKim9401 merged commit 8deb55d into DaleStudy:main Jan 25, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

3 participants