OpenAI Software Engineer Onsite Coding Questions
104+ questions from real OpenAI Software Engineer Onsite Coding rounds, reported by candidates who interviewed there.
What does the OpenAI Onsite Coding round test?
The OpenAI onsite coding round is the core technical evaluation. Software Engineer candidates typically see 2-3 algorithm and data structure problems. Problems range from medium to hard difficulty, and interviewers evaluate both correctness and code quality.
Top Topics in This Round
OpenAI Software Engineer Onsite Coding Questions
OpenAI Fulltime SDE Onsite Interview Experience and Feedback
Although I failed, I still wanted to give feedback. The main reason I failed was because I wasn't thinking clearly enough. I had two phone interviews, one on Software Development (SD) and one on codin
These past few days waiting for the results have been agonizing, so I'm sharing my interview experience to vent. I saw someone share that they received an offer first thing Saturday morning; does this
OpenAI Full Onsite SDE Interview Experience and Insights
Store Interview SD: CI/CD from the forum, mainly focusing on how to achieve exactly-once execution under the premise of Fault Tolerant and Scalability. Coding: Machine Tree to count and topology, orig
**Problem Overview** The task involves implementing a transaction tracking system that handles unordered events and creates a mechanism for funds to expire. The solution requires managing balances whe
I've been preparing for open AI interviews recently and have summarized most of the frequently asked questions I've seen. Generally speaking, it is very fragmented, so I summarize it to save everyone
#2502 Design Memory Allocator
LeetCode #2502: Design Memory Allocator. Difficulty: Medium. Topics: Array, Hash Table, Design, Simulation. Asked at OpenAI in the last 6 months.
#994 Rotting Oranges
LeetCode #994: Rotting Oranges. Difficulty: Medium. Topics: Array, Breadth-First Search, Matrix. Asked at OpenAI in the last 6 months.
#751 IP to CIDR
LeetCode #751: IP to CIDR. Difficulty: Medium. Topics: String, Bit Manipulation. Asked at OpenAI in the last 6 months.
#271 Encode and Decode Strings
LeetCode #271: Encode and Decode Strings. Difficulty: Medium. Topics: Array, String, Design. Asked at OpenAI in the last 6 months.
#981 Time Based Key-Value Store
LeetCode #981: Time Based Key-Value Store. Difficulty: Medium. Topics: Hash Table, String, Binary Search, Design. Asked at OpenAI in the last 6 months.
#71 Simplify Path
LeetCode #71: Simplify Path. Difficulty: Medium. Topics: String, Stack. Asked at OpenAI in the last 6 months.
#362 Design Hit Counter
LeetCode #362: Design Hit Counter. Difficulty: Medium. Topics: Array, Binary Search, Design, Queue, Data Stream. Asked at OpenAI in the last 6 months.
## Round 1 - Coding ## Problem **Format:** 5-round virtual onsite. Rounds include coding, system design, and behavioral. **Coding Round 1:** Given a large log file of API requests, each line formatted as `"TIMESTAMP METHOD PATH STATUS_CODE LATENCY_MS"`, parse and compute: - P50, P90, P99 latency per endpoint - Count of 5xx errors per endpoint per hour **Coding Round 2:** Design an in-memory task scheduler. Tasks have an ID, a scheduled timestamp, and a callback. Implement: - `schedule(task_id, run_at, callback)` - `cancel(task_id)` - `tick(current_time)` - fires all tasks due at or before `current_time` **System Design:** Design a distributed inference serving system for a large language model. Cover: - Load balancing across GPU replicas - Request batching for throughput - Handling streaming responses (token-by-token) - Model versioning and rollout **Behavioral Focus:** - A time you disagreed with a technical decision and how you handled it. - How you've influenced a team to adopt a better engineering practice. ## Follow-ups 1. For the log parser: how do you compute percentiles efficiently without sorting the full dataset? 2. For the task scheduler: what data structure gives O(log n) insert and O(log n) extraction of the earliest task? 3. In the serving system: how do you handle a GPU replica that goes down mid-request? 4. How would you test the task scheduler for correctness across time zone boundaries?
## Implement sendAsyncMessage and an End-to-End Simulation Previously, `sendAsyncMessage(nodeId, message)` was assumed to be provided. Now implement a runnable single-machine simulation. ### Tasks 1
## Reconstruct Distributed Tree Topology (Async Messaging) Same distributed tree and communication model as before: - No direct access to the global structure; only `sendAsyncMessage(nodeId, message
## Count Nodes in a Distributed Tree (Async Messaging) You are given a directed tree rooted at `root`. Each node represents an independent machine: - You **cannot** directly access `node.children` o
## Coding: Implement an extensible ChatApp with bots (multi-bot extensibility; multi-channel support) Implement a `ChatApp` class that processes user messages and bot responses. ### Requirements 1.
### Problem: IP range handling and CIDR representation (multi-part) Given an **IPv4**-related input, solve the following incremental subproblems (each part can build on the previous one). > Note: IP
## Problem: Build a rating card in Android Jetpack Compose (Coding) Implement a “rating + comment submission” card using **Kotlin + Jetpack Compose**. ### UI & Interaction 1. The card must include:
Implement a simplified Multi-Head Attention forward pass using NumPy or PyTorch, and clearly state tensor shapes. ### Inputs - `Q, K, V`: each of shape `(B, T, D_model)` - number of heads `H` with `D
What to Expect in the OpenAI Onsite Coding Round
The OpenAI Software Engineer Onsite Coding round has a specific calibration purpose distinct from other rounds in the loop. Across 104+ verified reports on LeakCode for this exact round type, the consistent expectations: clear scoping of the problem before diving into a solution, explicit reasoning about complexity, structured handling of edge cases, and the ability to discuss trade-offs between two reasonable approaches.
Reports tagged with the Onsite Coding round at OpenAI show recurring patterns in difficulty and topic distribution. The Onsite Coding round is typically 45-60 minutes; the interviewer is calibrated against a specific rubric. The discriminator between candidates who advance and candidates who do not is rarely the final correctness of the answer. It is the path: did you clarify, did you verbalize your approach, did you handle edge cases, and did you communicate throughout.
How To Prepare for This Specific Round
Filter the questions below to the most recent reports (past 6-12 months). Questions tagged for this exact round type from this exact company at this exact role level are the highest-signal data available. Older reports may reference questions that have since rotated out of the company's pool.
Practice 4-6 representative problems from this set under timed conditions. The goal is not memorization (companies rotate questions); the goal is to internalize the patterns the interviewer typically reaches for and the depth of follow-up to expect. Reports on LeakCode also tag the typical follow-up depth at this round type, which is the discriminating signal between hire and no-hire calibration.
Onsite Coding Round Timing and Format
The Onsite Coding round at OpenAI typically runs 45-60 minutes. Use the first 2-3 minutes to clarify requirements; you should never start coding or designing without verifying the input/output format, constraints, and edge cases out loud. Use the next 5-7 minutes to verbalize your approach before writing any code. The middle 20-30 minutes are implementation. Reserve the final 10 minutes for testing with concrete examples and discussing optimization or trade-offs.
Time budget discipline is one of the most reliable senior-vs-junior discriminators in this round. Strong candidates verbalize where they are in their budget out loud ("I've used about 20 minutes, I have 15 minutes left for testing and one optimization"). This signals engineering maturity to the interviewer and creates positive feedback they can capture in writing.
Common Failure Modes in This Round
Reports tagged "no hire" at OpenAI Software Engineer Onsite Coding commonly cite: coding silently without verbalizing approach, jumping to implementation before clarifying requirements, missing edge cases (empty input, single element, very large input), producing working code that the candidate cannot refactor when asked, and failing to test their solution with concrete examples before declaring done.
The single most predictive failure mode in 2025-2026 reports: not asking clarifying questions. Interviewers at all FAANG companies are explicitly trained to weight this dimension. Strong candidates ask 3-5 clarifying questions even on problems that look obvious; weak candidates dive into code immediately. The clarifying-question check is often the first signal recorded in the interviewer's notes.
See All 104 Questions from This Round
Full question text, answer context, and frequency data for subscribers.
Get Access