OpenAI logo

OpenAI Medium Interview Questions

9 medium-level practice questions for OpenAI technical interviews

coding Medium Verified Question #1

1. Implement cd Command


Category: Algorithm coding problem
Implement a simplified version of the Unix cd command. Given a current directory path and a relative destination path, return the final absolute...
Input: Given input
Output: Computed result
coding Medium Verified Question #2

2. Largest Subgrid


Category: Grid/matrix coding problem
You are given a 2D grid of non-negative integers and a maximum sum constraint. Find the largest size of a square sub-grid such that all...
Input: 2D grid
Output: Integer
coding Medium Verified Question #3

3. Virus Spread


Category: Grid/matrix coding problem
Simulate the spread of a virus through a grid. Each cell can be in one of three states: healthy, infected, or immune. *This is similar to a leetcode...
Input: 2D grid
Output: Integer
coding Medium Verified Question #4

4. Bot-Enabled Messaging System


Category: String coding problem
You are building a chat system that supports human users and automated bots. Messages are added to a channel log and may trigger bot responses. The...
Input: List
Output: Computed result
coding Medium Verified Question #5

5. GPU Credit Ledger


Category: String coding problem
You are designing a system to manage GPU credits. Each credit grant is valid during a specific time window. Events may arrive out of chronological...
Input: String
Output: Computed result
coding Medium Verified Question #6

6. GPU Credit Manager


Category: String coding problem
You are designing a system to manage GPU credits. Each credit grant is valid during a specific time window. Events may arrive out of chronological...
Input: String
Output: Computed result
coding Medium Verified Question #7

7. Version Support Finder


Category: Binary search coding problem
A software company maintains a sorted list of version strings in ascending chronological order. A critical feature was introduced in one version, and...
Input: List
Output: Computed result
coding Medium Verified Question #8

8. Monster Battle Simulator


Category: String coding problem
Simulate a deterministic, turn-based battle between two ordered teams of monsters. Execute the fight step by step and produce a chronological battle...
Input: List
Output: Computed result
coding Medium Verified Question #9

9. Distributed Tree Messaging


Category: Tree coding problem
You are implementing a message-passing protocol for a distributed system organized as a rooted n-ary tree. Each node represents a machine and...
Input: List
Output: Printed output

No AI generated questions yet for OpenAI.

Start practicing OpenAI questions

Sign up for free to access walkthroughs, AI-generated questions, and more.

Get Started Free