알고리즘(코딩테스트) 해시 공부
https://wnsgml517.tistory.com/67
[프로그래머스] 해시 - 의상
나의 답 def solution(clothes): clothes.sort() dic = {} num = 0 for value, t in clothes: dic[t]=0 for value, t in clothes: dic[t]+=1 for k in dic: if(dic[k]==1): num+=1 if(len(dic)==1 and num==0): return len(clothes) all_value = pow(2, len(clothes))-1 ch
wnsgml517.tistory.com
'르탄즈 5기' 카테고리의 다른 글
[르탄즈 5기] 1/25 TIL (1) | 2024.01.25 |
---|---|
[프로그래머스] 해시 - 베스트 앨범 (1) | 2024.01.25 |
[르탄즈 5기] 1/23(화) TIL (1) | 2024.01.23 |
[르탄즈 5기] 1/22 TIL (1) | 2024.01.22 |
[르탄즈 5기] 사전캠프 강의 2주차 로또번호생성기 (0) | 2024.01.22 |