← Questions

Predict the winner of a pick-from-either-end game

0
WaymoOpenAICodingLast asked Sep 2026

A coding interview question asked in OpenAI's agentic coding (beta) round and at Waymo, last asked Sep 2026. It tests dynamic programming and game theory.

Two players play on a row of non-negative integers. They alternate, Player 1 first; on each turn the player takes either the leftmost or the rightmost remaining number and adds it to their score.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • OpenAI · Agentic coding (beta) · Last asked Sep 2026An existing codebase and changes too large to write by hand; you work through them with an AI coding agent · An AI coding agent is expected
  • Waymo · Coding · Last asked Sep 202645 min · Usually two rounds; some give you the interviewer's buggy code to find and fix, some are read aloud with no skeleton

What it tests

dynamic programming · game theory

Your code and the AI tutor open when you unlock this question.