05-17 21:28
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- X윈도우
- systemd
- descriptive statistics
- 자바
- selenium
- Operator
- OOP
- 리눅스
- Unity
- Java
- 백준
- Binary Search
- python
- Entity Set
- X.org
- Mac
- Entity
- literal
- spring
- Polymolphism
- preprocessing
- Class
- 셀레니움
- 리눅스 마스터 1급
- External Scheme
- dbms
- Physical Scheme
- Reference Type
- Inheritance
- BFS
Archives
- Today
- Total
목록최단거리 (1)
Byeol Lo
미로찾기 - dfs
미로 문제가 나왔을때 다음과 같이 변수들을 선언하고 알고리즘을 짠다. graph = [ [1,1,1,0,1], [1,0,1,1,1], [1,1,1,0,1], [1,0,1,0,1], [1,1,1,1,1] ] visited = [[False]*len(graph[0]) for _ in range(len(graph))] dx = [1,-1,0,0] dy = [0,0,1,-1] def solution(graph, visited, x, y, walk) : if not visited[y][x] or visited[y][x] > walk : visited[y][x] = walk else : return for i in range(4) : pos1 = x+dx[i] pos2 = y+dy[i] # indexerror가 난..
Programming Language/Python
2022. 9. 2. 18:49