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 | 31 |
Tags
- 코테
- code
- 달리기경주
- drop
- 그리디알고리즘
- python
- sql
- 알고리즈
- Create
- sqld
- 코테준비
- LV.1
- 프로그래머스 코테
- greedy
- codingtest
- 코딩테스트문제
- DML
- DROP문
- 이코테
- 코딩테스트
- DDL
- 알고리즘
- alter문
- DCL
- ALTER
- create문
- 프로그래머스
- 달리기 경주
- programmers
- 파이썬
Archives
- Today
- Total
목록programmers (1)
DarkPepper_DevStory
[Lv.1] 달리기 경주
[문제 설명] https://school.programmers.co.kr/learn/courses/30/lessons/178871 [문제 해결 아이디어] player_index 딕셔너리에 players들의 현재 위치 index들을 저장해줍니다. 그 후 callings를 반복문을 돌려 각 위치를 바꿔준 후 player_index에 초기화 해줍니다. [코드] def solution(players, callings): #players index 저장 dic players_index = {} for i, player in enumerate(players): players_index[player] = i #순서 바꾸기 for call in callings: call_index = players_index[call..
코딩테스트/프로그래머스
2023. 6. 28. 14:38