본문 바로가기

상상쓰

검색하기
상상쓰
프로필사진 상상쓰

  • 분류 전체보기 (202)
    • Programming (10)
    • Coding Test (191)
    • Event (1)
Guestbook
Notice
Recent Posts
Recent Comments
Link
  • github
  • TOPCIT
«   2025/06   »
일 월 화 수 목 금 토
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
  • 정렬
  • dfs
  • java
  • divmod
  • 재귀함수
  • 추석맞이 코딩챌린지
  • backjoon
  • 자바
  • 프로그래머스
  • Re
  • programmers
  • BFS
  • 위클리 챌린지
  • Combinations
  • 다익스트라
  • DateTime
  • 카카오
  • 정규식
  • 파이썬
  • heapq
  • lambda
  • Set
  • 그리디
  • 백준
  • python
  • 동적 계획법
  • Zip
  • 이분탐색
  • KAKAO BLIND RECRUITMENT
  • 수학
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록게임 맵 최단거리 (1)

상상쓰

[프로그래머스] 게임 맵 최단거리

https://programmers.co.kr/learn/courses/30/lessons/1844 코딩테스트 연습 - 게임 맵 최단거리 [[1,0,1,1,1],[1,0,1,0,1],[1,0,1,1,1],[1,1,1,0,1],[0,0,0,0,1]] 11 [[1,0,1,1,1],[1,0,1,0,1],[1,0,1,1,1],[1,1,1,0,0],[0,0,0,0,1]] -1 programmers.co.kr BFS, 너비 우선 탐색이므로 가장 처음 방문했을 때 계산된 maps[][] 값이 최단 거리가 된다. from collections import deque def solution(maps): answer = -1 n = len(maps) m = len(maps[0]) visit = [[0 for j in ra..

Coding Test 2021. 6. 1. 10:19
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바