Find the minimum path sum from top to bottom of a triangle. At each step you move to an adjacent number in the row below (index i or i+1).
Bottom-up: start at the last row. Each cell picks the smaller of its two children below. After processing all rows, dp[0] holds the minimum path sum from top to bottom.