Minimum Falling Path Sum
Medium · Dynamic Programming · about 15 minutes
Asked at Amazon, Google, Microsoft, Apple, Meta.
Given an n × n integer matrix, return the minimum sum of a falling path: start at any cell in the first row and move to the next row's cell directly below or diagonally left/right.