-
Notifications
You must be signed in to change notification settings - Fork 1
[2023-07-03] yerim #70 #80
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
정석적인 풀이였던 것 같습니다! 고생하셨습니다!
깔끔한 풀이인 것 같아요..! union-find 관련 다른 문제들도 많이 풀어보시면 좋을 것 같아요! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다 !! 풀이 감사해요 ~!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
예림님 덕에 동일한 접근, 풀이지만 디테일의 차이로 많은 인사이트를 얻어갈 수 있었던 것 같습니다! 고생하셨어요!
|
||
|
||
# Union-Find | ||
def find(r, c): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
구현할 때 저는 while문이 조금 더 직관적이어서 활용하기 쉬웠던 것 같습니다! 일반적으로는 예림님 풀이처럼 재귀로 많이 접근하더라구요! 재귀를 활용한 find 방식을 볼 수 있어서 좋았습니다!
# 모든 셀의 값을 검색하며 update | ||
for i in range(51): | ||
for j in range(51): | ||
if table[i][j] == value1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 부분 매번 find 안해줘도 되는 것을 덕분에 알게 되었습니다~ 조금 더 제약 조건이 빡센 문제에서는 이런 디테일도 잘 챙겨야 할 것 같아요!
PR Summary
프로그래머스 - 표 병합
ISSUE NUMBER