OpenAI

Verified interview challenge

Find a maximum-score grid path

Build a dynamic program that evolves from finding the best score to explaining and counting optimal paths.

Unlock with Full Access

The challenge

Find a path through an integer grid with limited jumps. Later parts require reconstructing an optimum, counting all optimal paths and incorporating local bonuses. Extend the same implementation as the required output grows, keeping the original grid unchanged and preserving the meaning of your state.

What you'll practise

  • State design

    Represent the information needed for movement constraints and score decisions.

  • Extending an optimum

    Carry enough information to recover and count optimal paths when requirements change.

Your coding workspacePreview
Current partFurther parts unlock as you progress
solution.pyPython 3.13
# Build on your implementation

# Run checks for the current part

# Full starter code included
Current-part checks

Run your code to see results.

The complete sequence, starter code and checks are included with Full Access.