Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 514 Bytes

File metadata and controls

12 lines (9 loc) · 514 Bytes

Problem 12: The Triangle Descent (Triangle Minimum Path Sum)

Problem Statement

Given a triangle array, return the minimum path sum from top to bottom. For each step, you may move to an adjacent number on the row below. More formally, if you are on index i on the current row, you may move to either index i or index i + 1 on the next row.

Input Format

  • A 2D list triangle.

Example

Input: triangle = [[2],[3,4],[6,5,7],[4,1,8,3]]
Output: 11
Explanation: 2 + 3 + 5 + 1 = 11.