Question bank › Dynamic Programming
Dsa Dynamic Programming Medium

Robot Collection Challenge

A robot is located in the top-left corner of an `m x n` grid. Each cell in the grid holds a value representing the number of items the robot can collect at that position. The robot can only move either right or down. Your task is to calculate the maximum number of items the robot can collect by the time it reaches the bottom-right corner of the grid. Input Format: - The first line contains two integers, m (rows) and n (columns). - The next m lines each contain n integers representing the items in each grid cell. Output Format: - A single integer indicating the maximum items collected on a path from the top-left to the bottom-right corner. Constraints: - 1 <= m, n <= 20 - 0 <= items in each cell <= 50 Example: Input: 3 3 0 2 3 1 0 2 4 3 0 Output: 10

Key concepts

dynamic_programminggrid_navigationbacktracking

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of Praxari's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.