OpenAI Coding Interview Questions

These are the 43 OpenAI coding interview questions AceOffer has reconstructed from candidate reports, sorted by how often each was reported. Disease/Epidemic Spreading Simulation leads at 63×. Every question shows when it was last reported; the catalog refreshes monthly.

Key facts

  • 43 distinct coding questions indexed
  • 449 candidate reports across those questions
  • Most reported: Disease/Epidemic Spreading Simulation — 63× (last seen August 2026)
  • Refreshed monthly · last updated August 2026

Which OpenAI rounds ask coding questions?

OpenAI draws coding questions from the rounds below. Counts are distinct questions, not times asked.

Onsite coding41 questions

Most reported: Disease/Epidemic Spreading Simulation 63×

Async coding assessment2 questions

Most reported: Minimum Steps to Target Number via Modular Addition 1×

Which OpenAI coding questions get asked most?

Sorted by candidate-report frequency. Click any question for the full breakdown.

QuestionRoundReportedLast seen
Disease/Epidemic Spreading Simulation

You are given an M×N 2D grid representing a field of plants. Each cell is one of: 'X' (infected), '.' (healthy/susceptible), or…

Coding63×August 2026
GPU Credit Management SystemFree

Implement a GPU credit management system with the following methods: 1. add_credit(grant_id, amount, start_timestamp, expiration_duration_or_expiry_timestamp) — Add a credit grant with a…

Coding45×July 2026
Key-Value Store Design and Implementation

Implement a durable key-value store class with the following API: - put(key: str, value: str) / set(key, value) — insert or overwrite…

Coding42×July 2026
In-Memory SQL / Database Implementation

Implement an in-memory SQL-like database from scratch with no external frameworks. You are given (or must design) a DB class and must…

Coding34×February 2026
Toy Language: Type Inference and AST

You are given a toy programming language with the following grammar: Primitives: char, int, float (lowercase strings) Generics: Uppercase letter + number,…

Coding32×July 2026
Distributed Machine Count (Tree Network)

You are given an n-ary tree where each node represents a machine in a distributed cluster. Each node knows its own ID,…

Coding26×July 2026
Resumable List/File Iterator

Design and implement a resumable iterator — an iterator that supports pausing and resuming from a saved checkpoint. The iterator must expose…

Coding21×June 2026
Classifier Training and Analysis

Given a human-annotated dataset (text or image, e.g., CIFAR) that has been read into a Python environment (typically a Jupyter notebook with…

Coding20×May 2026
IP Address / CIDR Iterator

Implement a multi-part IPv4 iterator system in Python using the standard iterator protocol (__init__, __iter__, __next__). The problem is revealed one part…

Coding16×May 2026
Social Network Follower/Followee with Temporal Queries

Implement a SocialNetwork class that models a directed follow graph with snapshot (versioning) support. The system must support: Part 1 – Core…

Coding16×August 2026
Two-Team Turn-Based Combat System

Design and implement a turn-based battle engine for two teams of monsters. Each team has an ordered list of monsters; each monster…

Coding15×June 2026
Chatbot / Bot Message Router Refactoring

You are given an existing, messy codebase (approximately 100–1500 lines, depending on variant) implementing a chat/bot message processing system. The code handles…

Coding14×July 2026
Memory Allocator Implementation

Design and implement a memory allocator class. Initialize with a total memory size N (e.g., N=1000 bytes representing indices 0 to N-1,…

Coding13×August 2026
NumPy Puzzle / Vectorization

A 60-minute ML coding interview in which the candidate must implement a simple numerical routine involving arrays and basic math operations using…

Coding10×April 2026
KV Cache Implementation for Inference

Given a transformer model (typically after a debugging/bug-fixing exercise on the same codebase), implement KV cache to optimize autoregressive decoding/generation. A skeleton…

Coding8×May 2026
Python Dependency Version Control

You are given a sorted list of software dependency version strings in 'major.minor.patch' format (e.g., ['103.003.02', '103.003.03', '203.003.02', '1.1.1']). Each version either…

Coding7×April 2026
ML Coding: MLP/RNN Forward/Backward Propagation

A machine learning coding interview delivered as a Jupyter notebook or Python/PyTorch file (often 400+ lines with a skeleton to complete), covering:…

Coding6×July 2026
Entropy Calculation with Numerical Stability and Streaming

Given a vector of logits (raw unnormalized scores), implement Shannon entropy of the corresponding softmax distribution. The entropy is H = -Σ…

Coding5×July 2026
SQL Coding Problem

A multi-part SQL coding problem. Based on reports, it involves implementing database-like query operations in code, covering: (1) GET and SET operations,…

Coding4×November 2025
Text Editor (Buffer, Undo/Redo, Autocomplete, Collaboration)

Design and implement a text editor data structure that supports four progressively complex parts: Part 1 — Basic Text Buffer: Implement a…

Coding4×April 2026
Rate Limiter Implementation

You are given a buggy Python rate limiter implementation for a ChatGPT-like API service. The rate limiter is integrated into a web…

Coding4×July 2026
IP Address Account Registration / Fraud Detection

You are working on a Fraud / Trust & Safety team. Investigate the following scenario: the same IP address has been used…

Coding4×July 2026
Excel Sheet Cell Dependencies and Cycle Detection

Implement a Spreadsheet class with two methods: setCell(key, value) and getCell(key). Cells can hold either literal numeric values (e.g., '1', '2') or…

Coding4×April 2025
Jetpack Compose / UI Components Implementation

Build a rating card component in Kotlin Compose with rating and comment fields (both required before submission). Display success message after submit.…

Coding3×May 2026
Dynamic Human Labeling / Task Scheduling

Construct a scheduler for t tasks, m models, and h human labelers returning (task, model, human) tuples. Constraints: each human assigned ≥k…

Coding3×July 2026
Staff / Beat Notation Conversion

Parse instrument name and beat sequence (binary-like notation where '1 0' = half note, '1 1' = two quarter notes),…

Coding3×May 2025
File/Folder Deduplication and NavigationCoding3×April 2026
Track / Account Balance

Implement three functions for a grant-based balance system: create_grant(id, amount, timestamp, expiretime), subtract(amount, timestamp), get_balance(timestamp). Grants expire based on…

Coding2×March 2025
Bitwise Operations

OpenAI phone screen reportedly includes bitwise operations question. HR confirmed it is an algorithms problem…

Coding2×May 2025
CD Directory Navigation

Implement a 'cd' command that handles relative paths with special cases ('../A/B/', './A/', '../A/B/../', etc.). Write a cd() method that simplifies…

Coding2×October 2025
RL Bug Finding / Debugging

A coding challenge requiring knowledge of reinforcement learning, specifically Group Relative Policy Optimization (GRPO), and PyTorch. Task involves debugging and improving an…

Coding2×March 2026
Load Balancing with Multi-Tag Constraints

Schedule annotators (A) to label questions (Q) with multiple models (M). Constraints: (1) each (model, question) pair assigned evenly; (2) for each…

Coding2×May 2026
Binary Search / Version Search with Rate Limiting

Given versions in {major}.{minor}.{patch} format, find the earliest version supporting a feature using API calls optimized below linear complexity. Requires identifying that…

Coding2×August 2025
Overlapping Key Range / Shard Rebalancing

Part 1 (known problem): Given multiple shards with overlapping thresholds, output rebalanced shards minimizing data movement; solved using mini heap to maintain…

Coding2×June 2026
Stack Trace / Profile StackCoding2×July 2025
Largest Sub-Grid in 2D ArrayCoding1×October 2025
Implement ChatGPT-like React Interface with Streaming

Build a React component mimicking the ChatGPT UI (input box, message flow, loading states, streaming response handling).…

Coding1×March 2026
Game of Life

Similar to LeetCode 289. Approximately 5 sub-questions total. Requires careful attention to clarifying questions as some standard assumptions may change during the…

Coding1×November 2025
Grid Path Traversal with Constrained Jumps and Dynamic Scoring

Given an N×M grid starting from (0,p), reach bottom row via moves to (i+1,j-1), (i+1,j), (i+1,j+1), or special jump (i+2,j) up to…

Coding1×July 2026
Shortest Path to Visit All Points on a Grid

In an m×n grid with '.', '#', and '' cells, find the shortest path visiting all ''…

Coding1×October 2025
Test DesignCoding1×July 2026
Minimum Steps to Target Number via Modular Addition

Starting from a given number, at each step you can add any element from an array and take modulo. Find minimum steps…

OA1×November 2025
Shortest Path in Tree Network Visiting All Task Nodes

Given a start point, end point, and task nodes in a tree network, find the minimum time to start from start point,…

OA1×November 2025

Browse the full OpenAI catalog →

FAQ

How many coding questions does OpenAI ask?
AceOffer has reconstructed 43 distinct OpenAI coding interview questions from 449 verified candidate reports, each with verbatim follow-ups and a last-reported date.
What is the most common OpenAI coding interview question?
Disease/Epidemic Spreading Simulation — reported 63 times, last seen August 2026.
How fresh is AceOffer's OpenAI coding question data?
The catalog is refreshed monthly from new candidate reports, and every question shows when it was last reported.

Get the full OpenAI catalog

Every question, every candidate-reported follow-up, and what passers actually do. Monthly refresh.

Is this helpful?