PracHub
QuestionsLearningGuidesInterview Prep

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.

  • medium
  • OpenAI
  • Coding & Algorithms
  • Software Engineer

Add Consecutive-Value Bonuses to Grid Paths

Company: OpenAI

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

Quick Answer: 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.

Last updated: Jul 15, 2026
Loading…
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.

Related Coding Questions

  • Count Connected Friend Groups - OpenAI (medium)
  • Consistent Hashing Ring with Virtual Nodes for Shard Rebalancing - OpenAI (hard)
  • Infection Spread Simulation with Death Threshold - OpenAI (medium)
  • Find and Count Maximum-Score Grid Paths - OpenAI (medium)