Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 스택
- 수학
- MYSQL
- BFS
- level3
- BOJ
- 가상메모리 관리
- N과M
- 재귀
- dict
- python
- 다이나믹 프로그래밍
- dfs
- level0
- 딕셔너리
- level2
- 백준
- DP
- 구현
- 가상메모리
- 운영체제
- 다익스트라
- 힙
- 프로그래머스
- programmers
- 그리디
- 브루트포스
- level1
- 파이썬
- 코딩테스트
Archives
- Today
- Total
목록디스크컨트롤 (1)
동캄의 코딩도장
프로그래머스 level3 [디스크 컨트롤] 파이썬
https://programmers.co.kr/learn/courses/30/lessons/42627 코딩테스트 연습 - 디스크 컨트롤러 하드디스크는 한 번에 하나의 작업만 수행할 수 있습니다. 디스크 컨트롤러를 구현하는 방법은 여러 가지가 있습니다. 가장 일반적인 방법은 요청이 들어온 순서대로 처리하는 것입니다. 예를 programmers.co.kr def solution(jobs): answer = 0 schedule = [] jobs.sort() length = len(jobs) end = 0 while jobs: if schedule: #대기 열이 존재하는 경우 start, spend = schedule.pop() answer += (spend+end-start) end += spend else:..
코테/프로그래머스
2022. 4. 7. 20:32