Minimum Starting Health to Cross a Grid Moving Only Right or Down

Quick Overview

Given a grid of damage and healing values, find the smallest positive starting health that lets a traveler move only right or down from the top-left cell to the bottom-right cell without health ever dropping below one. It tests dynamic programming over grid paths and precise handling of the first and last cells.

Minimum Starting Health to Cross a Grid Moving Only Right or Down

Company: Goldman Sachs

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: easy

Interview Round: Onsite

Overview: Given a grid of damage and healing values, find the smallest positive starting health that lets a traveler move only right or down from the top-left cell to the bottom-right cell without health ever dropping below one. It tests dynamic programming over grid paths and precise handling of the first and last cells.

Goldman Sachs logo
Goldman Sachs
Sep 13, 2026
easySoftware EngineerOnsiteCoding & Algorithms
8
0
Loading...