Agoda·Software Engineer·Technical Phone Screen
May 2026
Got a dynamic programming question from Agoda, pretty standard triangle path sum problem. Nothing too wild but it took me a minute to get the direction of traversal right.
- Given a triangle represented as a 2D array, find the minimum path sum from the top to the bottom row, where at each step you can only move to an adjacent number in the row below.
“My first instinct was top-down recursion with memoization which works fine, but the cleaner solution is bottom-up DP starting from the second-to-last row and working upward.”