ByteDance logo

ByteDance Frontend Engineer Coding Questions

33 practice questions for ByteDance Frontend Engineer interviews

ByteDance 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

No verified questions yet for ByteDance.

coding Hard caching #1

1. [OA] Debounce Function — Implement ByteDance's Input Handling

For seamless user interaction, ByteDance applications require a debounced input handler to manage user typing events efficiently. Your task is to create a debounced function that limits the rate at which a handler can fire.
javascript
function debounce(func: Function, wait: number): Function;

Example 1:
Input: debounce(console.log, 200); // Call it with 'test'
debouncedFunc('test');

Output: Log occurs after 200ms after typing stops
Explanation: Ensures that the log function is triggered only when the user stops typing for 200ms.
Constraints:
- 1 <= wait <= 1000
- Function can be called multiple times rapidly.
coding Hard stack queue #2

2. [OA] Event Loop — Simulate ByteDance's Event Processing Queue

ByteDance often manages complex UI interactions that require event processing. This simulation will help understand how events are queued and processed reliably under high load.
Given a list of events, your task is to implement a function that simulates the processing of these events in the order they are queued while managing concurrent events.
javascript
function processEvents(events: string[]): void;
Example 1:
Input: `[

Related ByteDance Frontend Engineer interview prep

Start practicing ByteDance questions

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

Get Started Free