Add Consecutive-Value Bonuses to Grid Paths

Read the full interview experience this question came from →

Quick Overview

Extend the maximum-score grid path with bonuses for equal adjacent values and strictly increasing triples of visited cells. Dynamic programming must retain enough recent value history to maximize the score, count tied paths, and reconstruct the lexicographically smallest optimum.

Add Consecutive-Value Bonuses to Grid Paths

Company: OpenAI

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

Overview: Extend the maximum-score grid path with bonuses for equal adjacent values and strictly increasing triples of visited cells. Dynamic programming must retain enough recent value history to maximize the score, count tied paths, and reconstruct the lexicographically smallest optimum.

Read the full OpenAI Software Engineer interview experience this question came from

OpenAI logo
OpenAI
Jun 11, 2026
mediumSoftware EngineerOnsiteCoding & Algorithms
10
0
Loading...