← Mastercard questions

Maximum path sum in a matrix

Filed under Mastercard

Given an m x n integer matrix, find the maximum path sum from any cell in the first row to any cell in the last row. You can move down or diagonally left/right (or strictly down/diagonal depending on…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Mastercard questions

Collected from public candidate posts and coding forums. Updated Nov 2026.