OpenAI logo

OpenAI Frontend Engineer System Design Questions

53 practice questions for OpenAI Frontend Engineer interviews

OpenAI frontend engineer interviews emphasise JavaScript, DOM manipulation, CSS, accessibility, browser APIs, and UI component architecture.

All Roles Software Engineer Backend Engineer Frontend Engineer Full Stack Engineer Mobile Engineer Data Engineer Data Scientist ML Engineer DevOps Engineer DevOps Engineer Product Manager SRE Security Engineer Engineering Manager Data Analyst UX/UI Designer QA Engineer
1
System Design
system design Hard Verified Question #1

1. Top 5 Open AI System Design Questions


Category: Trie-based system design problem
# System Design Questions - OpenAI A collection of commonly asked system design questions from OpenAI interviews.
Input: Given input
Output: Computed result
system design Senior messaging #1

1. [OA] Design a Notification System for real-time updates

In developing OpenAI's products such as ChatGPT, a notification system for real-time updates on chat or model responses is essential. Design a system that allows publishing notifications and subscribing clients to receive them.
Define a class NotificationSystem that manages subscribers and notifications. Implement the following methods:
- subscribe(clientId: string, callback: Function): void — register a client with a callback to be notified.
- unsubscribe(clientId: string): void — remove a client from the list of subscribers.
- notify(message: string): void — send a message to all registered clients.
Example 1:
Input:
const notificationSystem = new NotificationSystem();
notificationSystem.subscribe('client1', (msg) => console.log(msg));
notificationSystem.notify('New message received!');
Output: New message received!
Explanation: Clients registered to receive notifications get the latest updates when notify is called.
Constraints:
- Client IDs are unique strings.
- Each notification should reach all active subscribers.
system design Senior api design #2

2. [OA] Design a Client-Side Router for a Single Page Application

OpenAI's applications such as Codex require efficient navigation without reloading entire pages. You are tasked with designing a client-side router for a web application.
Define a class Router that manages routes in an SPA. You should implement the following methods:
- addRoute(path: string, callback: Function): void — register a route with a specific path and callback function.
- navigate(path: string): void — navigate to the specified path and call the associated route's callback.
- getCurrentPath(): string — return the current path of the application.
Example 1:
Input:
const router = new Router();
router.addRoute('/home', () => console.log('Home Page'));
router.navigate('/home');
Output: Home Page
Explanation: Navigating to '/home' invokes the respective callback.
Constraints:
- Path strings will always start with '/' and only contain alphanumeric characters and slashes.
- A route can only be registered once.

Related OpenAI Frontend Engineer interview prep

Start practicing OpenAI questions

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

Get Started Free