일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Lv. 3
- 너비 우선 탐색
- 소프티어
- Baekjoon
- DP
- 오블완
- 프로그래머스
- javascript
- 깊이 우선 탐색
- softeer
- 백준
- Lv. 1
- SQL 고득점 KIT
- 동적계획법
- SQL
- LEVEL 2
- Dynamic Programming
- 파이썬
- level 3
- Lv. 0
- Lv. 2
- 티스토리챌린지
- 자바스크립트
- bfs
- group by
- programmers
- dfs
- Python
- Java
- join
- Today
- Total
목록Python (145)
몸과 마음이 건전한 SW 개발자
문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/12978?language=python3 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr정답 코드from collections import dequedef solution(N, road, K): answer = 0 adjL = [[] for _ in range(N+1)] for start, to, time in road: adjL[start].append((to, time)) adjL[to].append((s..
문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/12981?language=python3 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr정답 코드def solution(n, words): answer = [0, 0] prevWords = dict() lenW = len(words) kdx = 0 ldx = 0 lastW = "" while kdx 풀이 방법사실상 mdx와 ldx는 각각 몫과 나머지이다.몫과 나머지를 바탕으로 처음과 끝이 이어지지 않는 부..
문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/70130 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr정답 코드def solution(a): answer = 0 aDict = dict() lenA = len(a) for i in range(lenA): if aDict.get(a[i], 0): aDict[a[i]].append(i) else: aDict[a[i]] = [i] aDictKeys = list(..
문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/42626 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr정답 코드import heapqdef solution(scoville, K): answer = 0 heap = [] for s in scoville: heapq.heappush(heap, s) while heap and heap[0] 풀이 방법heap에 scoville을 전부 넣는다.heapq.heapify(scoville)로 scoville을 heap..
문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/49993 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr정답 코드def solution(skill, skill_trees): answer = 0 lenSK = len(skill) visited = [0 for _ in range(26)] for s in skill: visited[ord(s)-65] = 1 def isValid(st): idx = 0 for s in st: ..

문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/60058 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr정답 코드answer = ""def solution(p): global answer def isValid(uvp): stack = [] lenUVP = len(uvp) for i in range(lenUVP): cv = uvp[i] if cv == "(": stack.append(..