목록Data Engineering (3)
공부하자
https://github.com/hanbyeolkang/DE7 [2025.09.18] 2주차 파트 6까지 업로드. 파이썬 자료구조/알고리즘 및 HTML 구조 관련.[2025.09.19] 2주차 파트 8까지 업로드. HTTP 요청/응답 처리 및 HTML parser 관련.
123456789101112131415161718192021from functools import cmp_to_key def solution(numbers): strNums = map(str, numbers) strNums = sorted(strNums, key=cmp_to_key(compare)) return ''.join(strNums) if strNums[0] != '0' else '0' def compare(strNum1, strNum2): num1 = strNum1 + strNum2 num2 = strNum2 + strNum1 if num1 num2: return 1 elif num2 num1: return -1 else:..
1234567891011121314151617181920212223import heapq def solution(scoville, K): answer = 0 heapq.heapify(scoville) while True: min1 = heapq.heappop(scoville) if min1 >= K: break elif len(scoville) == 0: answer = -1 break min2 = heapq.heappop(scoville) new_scoville = min1 + 2*min2 heapq.heappush(scoville, new..