일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- gnuplot csv
- vim set noshowmatch
- 프로그래머스 체육복
- apt clean
- vim 찾아 바꾸기
- apt autoremove
- linux prompt color
- vim 괄호 비활성화
- csv x range
- latex 첨자
- Python Imaging Library
- Resolution Changing
- VirtualBox
- Climbing Stairs
- vim 치환
- 프로그래머스 실패율
- Leetcode 70
- Leetcode 121
- git commit message
- 프로그래머스
- without nohup.out
- linux bash
- 프로그래머스 구명보트
- 걸쳐서 그림 넣기
- LaTeX figure
- url reference
- vi/vim 명령어
- vi/vim commands
- python3
- tensorflow model load
- Today
- Total
목록Coding Test 준비/Programmers (5)
기억노트
Code def solution(N, stages): answer = [] n = len(stages) for i in range(1, N + 1): cnt = stages.count(i) rate = cnt / n if n != 0 else 0 answer.append([i, rate]) n -= cnt answer.sort(key = lambda x:x[1], reverse = True) answer = [i[0] for i in answer] return answer Result 정확성 테스트 테스트 1 〉 통과 (0.01ms, 10.2MB) 테스트 2 〉 통과 (0.14ms, 10.3MB) 테스트 3 〉 통과 (70.61ms, 10.5MB) 테스트 4 〉 통과 (379.54ms, 10.9MB) 테..
Code def solution(people, limit): answer = 0 people.sort() start = 0 end = len(people) - 1 while start
Code from collections import Counter def solution(n, lost, reserve): arr = [1] * (n+2) for x in reserve: arr[x] += 1 for x in lost: arr[x] -= 1 for i in range(len(arr)): if arr[i] == 0: if arr[i-1] == 2: arr[i] += 1 arr[i-1] -= 1 elif arr[i+1] ==2: arr[i] += 1 arr[i+1] -= 1 arr.pop(0) arr.pop() return len(arr) - Counter(arr)[0] Result 정확성 테스트 테스트 1 〉 통과 (0.02ms, 10.3MB) 테스트 2 〉 통과 (0.04ms, 10.2M..
Code def solution(prices): n = len(prices) answer = [] for i in range(n): sec = 0 for j in range(i+1, n): sec += 1 if prices[i] > prices[j]: break answer.append(sec) return answer Result 정확성 테스트 테스트 1 〉 통과 (0.01ms, 10.2MB) 테스트 2 〉 통과 (0.05ms, 10.2MB) 테스트 3 〉 통과 (0.97ms, 10.3MB) 테스트 4 〉 통과 (0.60ms, 10.3MB) 테스트 5 〉 통과 (0.85ms, 10.3MB) 테스트 6 〉 통과 (0.02ms, 10.3MB) 테스트 7 〉 통과 (0.37ms, 10.3MB) 테스트 8 〉..