← All problemsSign in

3418. Maximum Amount of Money Robot Can Earn

LeetCodeArrayDynamic ProgrammingMatrixOpen on judge ↗

You are given an m x n grid. A robot starts at the top-left corner of the grid (0, 0) and wants to reach the bottom-right corner (m - 1, n - 1). The robot can move either right or down at any point in time. The grid contains a value coins[i][j] in each cell: - If coins[i][j] >= 0, the robot gains that many coins. - If coins[i][j] < 0, the robot encounters a robber, and the robber steals the abs

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start