← Goldman Sachs questions

Optimal path in a grid

Filed under Goldman Sachs

Given a 2D grid where each cell contains a value, find a path from the bottom-left corner to the top-right corner that maximizes the sum of collected items, moving only up or right.

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 Goldman Sachs questions

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