Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- boj 11657
- count triplets
- lock based queue
- two characters
- boj 1717
- lock free stack
- c++
- string construction
- LCS
- the longest increasing subsequence
- 2025 프로그래머스 코딩챌린지 1차예선
- lock based stack
- boj 6443
- 프로그래밍공부
- special string again
- making anagrams
- PCCE
- find the running median
- 지게차와 크레인
- DirectX12
- 브루트포스
- gas
- DirectX
- boj 1074
- pcce 기출문제 풀이
- ice cream parlor
- dp
- pccp 기출문제 풀이
- the maximum subarray
- find the town judge
Archives
- Today
- Total
목록베스트앨범 (1)
오구의코딩모험

[코딩테스트 고득점KIT - 해시] from collections import defaultdict def solution(genres, plays): answer = [] # 장르, 재생 횟수 딕셔너리 생성 및 초기화 play_dict = defaultdict(int) genre_dict = defaultdict(list) # 장르, 재생 횟수 딕셔너리 값 추가 for idx in range(len(genres)): play_dict[genres[idx]] += plays[idx] genre_dict[genres[idx]].append(plays[idx]) # 재생 횟수의 합 딕셔너리 내림차순 정렬 후, # 재생 횟수가 가장 높은 장르부터 장르 딕셔너리에 대입하여 재생 횟수를 내림차순으로 저장한다. #..
프로그래밍 공부/프로그래머스
2022. 12. 22. 00:01