OpenAI Software Engineer interview questions

460 Software Engineers have shared notes from their OpenAI interviews, with the questions they were asked in each round. That is 69% of the 667 OpenAI interview notes on Screna AI.

460 Software Engineer interview notes

OpenAI·Software Engineer·Technical Phone Screen

Jul 2026
OpenAI software engineering interview with a systems-focused coding problem. The question was about building a persistent key-value store from scratch with shard-based file storage, which sounds manageable until you actually have to think through all the edge cases live.
  • Design and implement a persistent key-value store that writes data to fixed-size shard files on disk. The store should support put, get, delete, shutdown (persist to disk), and restore (reload from disk). You're given encode/decode helpers for serialization.

“I spent the first few minutes just trying to nail down the in-memory index before even thinking about the file layout, which was probably backwards.”

View Post

OpenAI·Software Engineer·Technical Phone Screen

Jul 2026
OpenAI software engineer interview focused on a persistent key-value store problem with some meaty follow-ups around storage and write-ahead logging. The core question was manageable but the follow-ups are where things got real.
  • Implement an in-memory key-value store with put, get, delete, serialize, and deserialize operations. Keys and values are arbitrary byte strings so you can't rely on delimiters.
  • The serialized data might be too large for a single file. How would you extend the persistence format to split data across multiple files or segments and still restore correctly?
  • Full rewrites on shutdown are expensive once the store grows. How would you add an append-only mutation log, replay it on startup, and decide when to compact it back into a snapshot?

“The delimiter thing is what trips people up.”

View Post

OpenAI·Software Engineer·Technical Phone Screen

Jul 2026
Got a coding problem at OpenAI for a software engineer role that was deceptively tricky to think through cleanly. The core problem was manageable but the follow-up about prefix-balanced scheduling added a whole layer I wasn't fully prepared for.
  • Design a scheduling system for a data labeling platform with tasks, AI models, and human annotators. Given counts for each entity type and a minimum assignment threshold k, return a list of [task, model, human] assignments such that every human appears in at least k assignments and no human is assigned the same task more than once.
  • Follow-up: modify your solution to return a prefix-balanced schedule, where at every prefix of the output the task-model usage counts differ by at most 1, and each human's per-model usage counts also differ by at most 1.

“Spent the first few minutes just making sure I understood the constraints, which was the right call.”

View Post

OpenAI·Software Engineer·Onsite - System Design / Architecture

Jul 2026
OpenAI SWE interview that went deep on memory allocator design, starting from a basic first-fit implementation and pushing all the way through coalescing, best-fit optimization, and complexity trade-offs. Four parts total, each building on the last, and the follow-ups got pretty hairy toward the end.
  • Design and implement a simplified memory allocator with malloc and free operating over a single fixed-size heap array. Walk from a correct first-fit implementation to an optimized one, covering block layout, splitting, and per-operation complexity.
  • How should free handle adjacent free blocks, and what is the difference between external and internal fragmentation?
  • Propose a best-fit optimization for the allocator. What data structure makes the lookup efficient, and why is a plain min-heap not a clean fit?
  • Compare first-fit and best-fit on allocation time, metadata overhead, and long-run fragmentation behavior. When would you prefer each?
  • How would you make the allocator thread-safe, starting from a global lock and then reducing contention?
  • How do boundary tags enable O(1) coalescing without a prev pointer in the block header?
  • How would you detect heap corruption, such as through canaries or header checksums, without unacceptable overhead?

“This is the kind of question where you think you know it and then the details eat you alive.”

View Post

OpenAI·Software Engineer·Onsite - System Design / Architecture

Jul 2026
System design round at OpenAI for a software engineering role, centered entirely on designing a Sora-style text-to-video generation platform. The question was massive and the interviewers clearly had a specific mental model they were probing toward, especially around failure handling and job state machines. Walked out unsure whether I'd gone deep enough on the parts that actually mattered.
  • Design a text-to-video generation platform similar to Sora, covering the user-facing API, job lifecycle, GPU worker scheduling, failure handling, artifact storage, safety enforcement, and observability.
  • A worker gets network-partitioned, the system declares it dead and retries the job elsewhere, the retry completes successfully, and then the original worker comes back online and tries to publish its result. How does your design prevent a double publish or double billing?
  • If 80% of a long-running GPU job completes and then the spot instance gets preempted, how do you avoid restarting the entire computation from scratch?
  • Inference finished but the post-processing stage (encoding, upscaling, watermarking) crashed. What do you re-run and what must you absolutely not re-run?
  • A single prompt consistently crashes every worker that picks it up. How does the system protect the rest of the fleet, and how do you handle billing for that job?
  • GPU utilization is sitting at 60% while job queues are full and wait times are rising. What are the likely causes and how does your monitoring help you figure out if the bottleneck is scheduling, the model, or hardware?
  • How would you make the job submission API idempotent so that a client retry on a timeout never creates a duplicate GPU job or triggers a double charge?
  • How do you enforce safety at both the prompt level and the generated frame level, and how do you handle watermarking and content provenance?

“This is the kind of question where you can spend 45 minutes and still feel like you only scratched the surface.”

View Post

OpenAI·Software Engineer·Technical Phone Screen

Jul 2026
Got a pretty gnarly coding problem for an OpenAI software engineer round. The problem was a custom data structure with some real edge cases around ordering and retroactive updates. Came out feeling like I had a decent handle on the core design but probably fumbled the complexity analysis at the end.
  • Design and implement an expiring-credit ledger that supports out-of-order event insertion. The ledger should expose three operations: adding a credit bucket with an id, amount, activation timestamp, and expiration duration; charging a given amount at a given timestamp by consuming from the earliest-expiring active credits first (with tie-breaking by activation time then lexicographic id); and querying the total active balance at any timestamp. Events can arrive in arbitrary timestamp order, so the structure must handle retroactive inserts correctly.

“The basic structure clicked pretty fast.”

View Post

OpenAI·Software Engineer·Technical Phone Screen

Jul 2026
Interviewed for a software engineering role at OpenAI and got a problem set built around IPv4 address iteration. Four parts, each building on the last, ending with an open-ended optimization discussion. Felt pretty solid on the first two but the CIDR bitmasking tripped me up more than I expected.
  • Implement a Python class that iterates forward through IPv4 addresses starting from a given IP up to 255.255.255.255, using the iterator protocol.
  • Now implement a reverse iterator that starts from a given IP and counts down to 0.0.0.0.
  • Given a CIDR string like '192.168.1.0/24', use bitwise operations to compute the start and end IP of the range, then iterate through all addresses in it.
  • How would you optimize the time and space complexity of these iterators for very large CIDR ranges, like /8 or /0?

“This part was fine.”

View Post

OpenAI·Software Engineer·Technical Phone Screen

Jul 2026
Interviewed for a SWE role at OpenAI and got a graph propagation problem about simulating infection spread across a network. Pretty classic BFS territory but the exact rules were left vague, which made it a bit of a guessing game.
  • Given a graph and a set of initially infected nodes, simulate how an infection spreads through the network according to a set of propagation rules. Return the requested output, such as the earliest time each node gets infected, which nodes are infected by step T, or whether a specific target node ever gets infected.

“My first instinct was BFS and I just went with it.”

View Post

OpenAI·Software Engineer·Technical Phone Screen

Jul 2026
OpenAI SWE interview that went deep into ML fundamentals pretty fast. The core task was implementing matrix multiplication forward and backward passes in PyTorch, then a follow-up about parallelizing the backward pass using scan-style thinking. More math-heavy than I expected for a coding round.
  • Implement the forward pass for matrix multiplication in PyTorch: given A of shape (M, K) and B of shape (K, N), return C = A @ B.
  • Given upstream gradient dC of shape (M, N), implement the backward pass to compute dA and dB for the matrix multiplication.
  • Restructure the backward pass implementation to be more parallel-friendly, drawing inspiration from parallel prefix scan approaches like Hillis-Steele. Explain how your design reduces sequential dependencies.

“This part was fine.”

View Post

OpenAI·Software Engineer·Onsite - System Design / Architecture

Jul 2026
System design round at OpenAI for a software engineer role, focused entirely on building an online ad serving system from scratch. Pretty brutal scope, they wanted everything from auction mechanics to GDPR compliance in one session.
  • Design an end-to-end online ad serving system that returns targeted ads within 100ms, covering campaign management, budgets, pacing, frequency capping, targeting, real-time auctions, and near-real-time reporting.
  • Walk through the API design for an ad request and response, and define the core data models for campaigns, bids, and user targeting.
  • Describe the overall system architecture including edge gateways, ad selector, feature store, model service, auctioneer, throttling and pacing service, caching, and the logging pipeline.
  • Which auction mechanism would you choose and why? How does your choice affect advertiser incentives?
  • How would you handle the cold start problem for new advertisers or new ad creatives with no historical performance data?
  • What's your strategy for A/B testing in an ad serving system, especially given auction dynamics and budget interference between variants?
  • How would you approach privacy and compliance requirements like GDPR and CCPA in this system, particularly around user targeting and data retention?
  • How would you estimate capacity requirements for this system? Walk through a back-of-the-envelope calculation for request volume, storage, and infrastructure.

“The 100ms constraint is the first thing that should shape every decision you make, and I didn't anchor on it hard enough early on.”

View Post