Search⌘ K
AI Features

Triangle

Explore how to apply dynamic programming to find the minimum path sum from the top to the bottom of a triangle array. Understand movement constraints and practice implementing an efficient solution for optimization problems using array adjacency rules.

Statement

Given an array, triangle, return the minimum path sum from top to bottom.

You may move to an adjacent number in the row below at each step. More formally, if you are at index ii in the current row, you may move to either index ii or index i+1 ...