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