본문 바로가기

프로그래머스 level 216

[프로그래머스] LV2 카펫 | 파이썬 https://medium.com/@k62570/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4-lv2-%EC%B9%B4%ED%8E%AB-%ED%8C%8C%EC%9D%B4%EC%8D%AC-6f385ac4f656 [프로그래머스] LV2 카펫 | 파이썬After Age 40, You Need to Stop Doing These Morning Habits — That Speed Up Aging Your Morning Routine Making You Age Faster?medium.com 2025. 5. 12.
[프로그래머스] LV2 소수 찾기 | 파이썬 https://medium.com/@k62570/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4-lv2-%EC%86%8C%EC%88%98-%EC%B0%BE%EA%B8%B0-%ED%8C%8C%EC%9D%B4%EC%8D%AC-59776527af4c [프로그래머스] LV2 소수 찾기 | 파이썬“[프로그래머스] LV2 소수 찾기 | 파이썬” is published by Taein Yong.medium.com 2025. 5. 12.
[프로그래머스] LV2 H-Index | 파이썬 Solution :def solution(citations): citations.sort(reverse=True) # 인용수 내림차순 정렬 for idx, citation in enumerate(citations): # print(citation, idx) if citation Skills :- 2025. 5. 12.
[프로그래머스] LV2 가장큰수 | 파이썬 Solution :- 내 풀이def solution(numbers): numbers.sort(key=lambda x:str(x)*6,reverse=True) # print(numbers) answer = '' for i in numbers: i=str(i) answer+=i answer=int(answer) return str(answer) - 모범 답안def solution(numbers): numbers.sort(key=lambda x:str(x)*6,reverse=True) str_numbers=[str(i) for i in numbers] answer=''.join(str_numbers) a.. 2025. 5. 12.
[프로그래머스] LV2 더 맵게 | 파이썬 링크 : https://medium.com/@k62570/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4-lv2-%EB%8D%94-%EB%A7%B5%EA%B2%8C-%ED%8C%8C%EC%9D%B4%EC%8D%AC-42f613a67a62 [프로그래머스] LV2 더 맵게 | 파이썬After Age 40, You Need to Stop Doing These Morning Habits — That Speed Up Aging Your Morning Routine Making You Age Faster?medium.com 2025. 5. 7.
[프로그래머스] LV2 주식가격 | 파이썬 Solution :## 시간복잡도 최악의 경우 O(N^2)from collections import dequedef solution(prices): # 초기화 q_prices=deque(prices) answer=[] while q_prices: count=0 temp_value=q_prices.popleft() # 값이 나오고. for i in q_prices: count+=1 if temp_value >i : break answer.append(count) return answer## 시간복잡도 더 빠름.def solution(prices): s.. 2025. 5. 7.