[W07] 임정현 주간 풀이 - #50
Open
JeonghyeonIm wants to merge 1 commit into
Open
JeonghyeonIm wants to merge 1 commit into
JeonghyeonIm wants to merge 1 commit into
Conversation
Contributor
🤖 PR 자동 분석
변경된 풀이
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 핵심 접근
N명의 사용자 가입한 OTT
기능
사용자는 1~N까지의 고유 번호
각 영화는 ID, 장르가짐
영화는 ID로 구분되고 같은 ID가진 영화는 없음 장르는 1~5사이
영화는 총점을 가짐
사용자가 영화 시청하고 평점을 주면 그 영화의 총점은 사용자가 준 평점만큼 +
각 사용자는 시청 목록
사용자가 영화를 시청하면 그 영화가 시청 목록에 추가됨
사용자는 이미 시청한 영화를 다시 시청하지는 않음
영화가 삭제되면, 그 영화는 시청 및 추천 불가 + 사용자의 시청 목록에서도 삭제
영화추천 규칙
=> 음 풀이접근은 굉장히 빠르게 접근한거같은데, 세부 구현에서 조금 시간이 걸렸습니다
그냥 set, map쓰면 될거같았지만, 평점이 같으면 최근 시청한것이 우선순위가 높고, 총점이 같은경우 더 최신에 등록한 영화가 우선순위가 높아, set의 기본 oper인 < 대신 oper를 직접 구현해주면서 문제를 해결했습니다.
🔍 리뷰 요청
B형은 만만해보이면 항상 뭔가 있네요,,,, 파이팅!!!!!
형님들 꿀팁좀요ㅠ.ㅠ