일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 스택
- level1
- 구현
- 다이나믹 프로그래밍
- 파이썬
- 딕셔너리
- python
- N과M
- level2
- 재귀
- 가상메모리 관리
- DP
- BFS
- 운영체제
- MYSQL
- 코딩테스트
- programmers
- level0
- 가상메모리
- 브루트포스
- dict
- 프로그래머스
- 백준
- 그리디
- dfs
- 수학
- 다익스트라
- 힙
- BOJ
- level3
- Today
- Total
목록level2 (47)
동캄의 코딩도장
https://programmers.co.kr/learn/courses/30/lessons/17683 코딩테스트 연습 - [3차] 방금그곡 방금그곡 라디오를 자주 듣는 네오는 라디오에서 방금 나왔던 음악이 무슨 음악인지 궁금해질 때가 많다. 그럴 때 네오는 다음 포털의 '방금그곡' 서비스를 이용하곤 한다. 방금그곡에서는 TV, programmers.co.kr #프로그래머스 [3차] 방금그곡 m_={'C':'a','C#':'b','D':'c','D#':'d','E':'e','E#':'q','F':'f','F#':'g','G':'h','G#':'i','A':'j','A#':'k','B':'l'} def mel_to_code(melody): i=0 code=[] while imelody_len: for i i..
https://programmers.co.kr/learn/courses/30/lessons/64065 코딩테스트 연습 - 튜플 "{{2},{2,1},{2,1,3},{2,1,3,4}}" [2, 1, 3, 4] "{{1,2,3},{2,1},{1,2,4,3},{2}}" [2, 1, 3, 4] "{{4,2,3},{3},{2,3,4,1},{2,3}}" [3, 2, 4, 1] programmers.co.kr #프로그래머스 튜플 def solution(s): answer = [] i=1 lst=[] while i
https://programmers.co.kr/learn/courses/30/lessons/42577?language=python3 코딩테스트 연습 - 전화번호 목록 전화번호부에 적힌 전화번호 중, 한 번호가 다른 번호의 접두어인 경우가 있는지 확인하려 합니다. 전화번호가 다음과 같을 경우, 구조대 전화번호는 영석이의 전화번호의 접두사입니다. 구조 programmers.co.kr 시도1: 실패 (시간초과 풀이) #프로그래머스 전화번호 목록 def solution(phone_book): phone_book.sort() for i in range(len(phone_book)): for j in range(i+1,len(phone_book)): leng=len(phone_book[i]) if leng
https://programmers.co.kr/learn/courses/30/lessons/42626 코딩테스트 연습 - 더 맵게 매운 것을 좋아하는 Leo는 모든 음식의 스코빌 지수를 K 이상으로 만들고 싶습니다. 모든 음식의 스코빌 지수를 K 이상으로 만들기 위해 Leo는 스코빌 지수가 가장 낮은 두 개의 음식을 아래와 같 programmers.co.kr #프로그래머스 더 맵게 def solution(scoville, K): import heapq answer = 0 heapq.heapify(scoville) leng=len(scoville) while scoville[0]1: x1=heapq.heappop(scoville) x2=heapq.heappop(scoville) new= x1+x2*2 he..
https://programmers.co.kr/learn/courses/30/lessons/42888 코딩테스트 연습 - 오픈채팅방 오픈채팅방 카카오톡 오픈채팅방에서는 친구가 아닌 사람들과 대화를 할 수 있는데, 본래 닉네임이 아닌 가상의 닉네임을 사용하여 채팅방에 들어갈 수 있다. 신입사원인 김크루는 카카오톡 오 programmers.co.kr #프로그래머스 오픈채팅방 def solution(record): answer = [] lst={} prompt=[] for line in record: s=list(map(str,line.split())) if s[0]!='Leave': lst[s[1]]=s[2] prompt.append(s) for line in prompt: if line[0]=='Enter..
https://programmers.co.kr/learn/courses/30/lessons/42578 코딩테스트 연습 - 위장 programmers.co.kr #프로그래머스 위장 def solution(clothes): answer = 1 lst={} for clothe in clothes: if clothe[1] in lst: lst[clothe[1]]+=1 else: lst[clothe[1]]=1 for val in lst.values(): answer*=(val+1) return (answer-1) 세트( '{}' )을 이용하여 문제를 해결하였다. def solution(clothes): from collections import Counter from functools import reduce c..