OpenAI

OpenAI Software Engineer Onsite Coding Questions

13+ questions from real OpenAI Software Engineer Onsite Coding rounds, reported by candidates who interviewed there.

13
Questions
8
Topic Areas
10+
Sources

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

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

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

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

**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

#2502 Design Memory Allocator

Arrays,Hash Table,Design,Simulation

LeetCode #2502: Design Memory Allocator. Difficulty: Medium. Topics: Array, Hash Table, Design, Simulation. Asked at OpenAI in the last 6 months.

#994 Rotting Oranges

Arrays,Bfs,Graph,Matrix

LeetCode #994: Rotting Oranges. Difficulty: Medium. Topics: Array, Breadth-First Search, Matrix. Asked at OpenAI in the last 6 months.

#751 IP to CIDR

Bit Manipulation,Strings

LeetCode #751: IP to CIDR. Difficulty: Medium. Topics: String, Bit Manipulation. Asked at OpenAI in the last 6 months.

#271 Encode and Decode Strings

Arrays,Strings,Design

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

Hash Table,Strings,Binary Search,Design

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

Strings,Stack

LeetCode #71: Simplify Path. Difficulty: Medium. Topics: String, Stack. Asked at OpenAI in the last 6 months.

#362 Design Hit Counter

Arrays,Binary Search,Design,Queue

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?

See All 13 Questions from This Round

Full question text, answer context, and frequency data for subscribers.

Get Access