Company: Arcadis

Difficulty: medium

Problem Statement

Samurai and His Friends Two friends start at `(0,0)` and `(0,n-1)` in a chocolate grid. On each row transition, each moves down-left, down, or down-right while staying in the grid. Collect the chocolates in visited cells; a shared cell is counted once. Print the maximum total collected after the final row. Input Format First line: `m n`. Then `m*n` non-negative grid values in row-major order. Output Format Print the maximum total. Constraints `1 <= m,n <= 70`.

More Arcadis OA questionsInterview experiences