일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- TiL
- 커스텀 헤더
- KPT회고
- jwttoken
- 프로그래머스 이중우선순위큐
- spring batch 5.0
- 디자인 패턴
- 99클럽
- 빈 조회 2개 이상
- 파이썬
- 개발자부트캠프추천
- 전략패턴 #StrategyPattern #디자인패턴
- 디자인패턴
- infcon 2024
- 1주일회고
- 항해99
- 코딩테스트 준비
- 개발자 취업
- 인프콘 2024
- 단기개발자코스
- 프로그래머스
- 구글 OAuth login
- DesignPattern
- jwt
- 취업리부트코스
- Python
- Spring multimodule
- JavaScript
- 빈 충돌
- @FeignClient
- Today
- Total
목록코딩테스트 준비 (12)
m1ndy5's coding blog
https://school.programmers.co.kr/learn/courses/30/lessons/1844 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr문제는 위 쪽에서! 전형적인 최단거리 길찾기 문제!from collections import dequedef solution(maps): answer = -1 # 하, 상, 좌, 우 dx, dy = (0, 0, -1, 1), (-1, 1, 0, 0) w, h = len(maps[0]), len(maps) visited = [[0 for _ in range(w)] ..
https://school.programmers.co.kr/learn/courses/30/lessons/43165 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr문제는 위쪽에서! def solution(numbers, target): answer = [0] def dfs(cur, i): if i == len(numbers): if cur == target: answer[0] += 1 return dfs(cur+numbers[i], i+1)..
https://school.programmers.co.kr/learn/courses/30/lessons/42839 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr문제는 위쪽에서! import itertoolsdef solution(numbers): answer = 0 arr = set() for i in range(1, len(numbers)+1): # numbers에 있는 숫자로 만들 수 있는 조합 for a in itertools.permutations(numbers, i): num..
https://school.programmers.co.kr/learn/courses/30/lessons/42842 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr문제는 위쪽에서! 이 문제도 옛날에 풀어봤던 문제라서 별로 어렵지 않게 풀었다.import mathdef solution(brown, yellow): answer = [] for h in range(1, int(math.sqrt(yellow))+1): if yellow % h == 0: w = yellow//h if w+h+2 == brow..
https://school.programmers.co.kr/learn/courses/30/lessons/42747 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr문제는 위쪽에서! def solution(citations): answer = 0 citations.sort(reverse=True) for i in range(len(citations)): if citations[i] >= i+1: answer = i+1 else: break return..
https://school.programmers.co.kr/learn/courses/30/lessons/42746 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr문제는 위 쪽에서! 이 문제도 옛날에 풀어봤던 문제라서 어렵지 않게 풀었다.def solution(numbers): answer = '' numbers = [str(num) for num in numbers] numbers = [[num * (12//len(num)), len(num)] for num in numbers] numbers.sort() for i in ra..
https://leetcode.com/problems/smallest-number-in-infinite-set/description/문제는 위쪽에서! 힙을 사용하면 간단하게 풀리는 문제였다.그리고 Infinite Set라면서 num의 제한이 1000까지였다는 어이없는(?)ㅋㅋㅋㅋㅋㅋㅋㅋㅋ import heapqclass SmallestInfiniteSet: def __init__(self): self.hq = [i for i in range(1, 1001)] heapq.heapify(self.hq) self.s = set(self.hq) def popSmallest(self) -> int: res = heapq.heappop(self.h..
https://school.programmers.co.kr/learn/courses/30/lessons/42626 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr문제는 위쪽에서! 힙을 사용하면 쉽게 풀 수 있는 문제였다!import heapqdef solution(scoville, K): answer = 0 heapq.heapify(scoville) while True: # 가장 맵지 않은, 두번째로 맵지 않은 first, second = heapq.heappop(scoville), heapq.heappop(sc..
https://school.programmers.co.kr/learn/courses/30/lessons/12909 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr문제는 위쪽에서! 스택의 아아아아아아아아주 대표적인 문제 중 하나인 괄호 문제!많이 풀어봐서 어려운 것은 없었다.def solution(s): answer = True stack = [] # '('일 때 집어넣고 ')'일 때 pop for p in s: if p == '(': stack.append('(') else: ..
https://school.programmers.co.kr/learn/courses/30/lessons/42586 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr문제는 위쪽에서! def solution(progresses, speeds): answer = [] days = [] cnt = 1 l = len(progresses) # 나머지가 있으면 완료까지 + 1 for i in range(l): day = (100-progresses[i]) // speeds[i] rest = (100-pr..