329. Longest Increasing Path in a Matrix
·
Algorithm
Longest Increasing Path in a Matrix - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 양의 정수로 구성된 2차원 배열이 주어진다. 2차원 배열의 임의의 인덱스 (i, j)에서 시작해 현재 인덱스가 가리키는 값 보다 큰 값으로만 4방 이동할 수 있다고 가정할 때, 이동할 수 있는 최대 거리의 길이를 반환하는 문제다. 예시 1. DFS + DP from typing import * class Solution: def longestIncr..