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
- SQL 고득점 KIT
- 스택
- 자바스크립트
- Lv. 0
- Lv. 3
- dfs
- bfs
- 프로그래머스
- DP
- Python
- 너비 우선 탐색
- 타입스크립트
- 소프티어
- Lv. 1
- 파이썬
- softeer
- group by
- 다이나믹프로그래밍
- Dynamic Programming
- programmers
- javascript
- 문자열
- C언어
- Typescript
- Java
- level3
- Lv. 2
- Stack
- level 3
- 브루트포스
Archives
- Today
- Total
목록행렬 테두리 회전하기 (1)
몸과 마음이 건전한 SW 개발자
프로그래머스 Lv. 2 행렬 테두리 회전하기 Python
문제 링크 https://school.programmers.co.kr/tryouts/72048/challenges 정답 코드 def solution(rows, columns, queries): newMap = [[0 for _ in range(columns)] for _ in range(rows)] cnt = 1 for r in range(rows): for c in range(columns): newMap[r][c] = cnt cnt += 1 answer = [] for x1, y1, x2, y2 in queries: x1 -= 1 y1 -= 1 x2 -= 1 y2 -= 1 minV = 10001 nextV = newMap[x1][y1] # 상단 for ny in range(y1+1, y2+1): if..
알고리즘
2024. 1. 3. 22:18