Netflix Onsite | SWE | HM
Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2023-08-24Added By Anonymous
Source: Link
Company: Netflix
Role: SWE (Software Engineer)
Stage: HM (Hiring Manager)
Location: unknown
Year: unknown
Original Experience:
**Problem Statement:** Task Scheduler with Buffered Execution You are tasked with designing a system, named `TaskProcessor`, that efficiently handles a stream of tasks. The system should ensure that when a certain number of tasks accumulate (e.g., a batch of 10), they are processed or flushed for execution. It should also have mechanisms to deal with large influxes of tasks and ensure smooth processing. ```cpp class TaskProcessor { public: TaskProcessor(); // Adds a new task to the processor void runTask(std::function<void()> task); // Processes accumulated tasks void flushTasks(); }; ```
Role: SWE (Software Engineer)
Stage: HM (Hiring Manager)
Location: unknown
Year: unknown
Original Experience:
**Problem Statement:** Task Scheduler with Buffered Execution You are tasked with designing a system, named `TaskProcessor`, that efficiently handles a stream of tasks. The system should ensure that when a certain number of tasks accumulate (e.g., a batch of 10), they are processed or flushed for execution. It should also have mechanisms to deal with large influxes of tasks and ensure smooth processing. ```cpp class TaskProcessor { public: TaskProcessor(); // Adds a new task to the processor void runTask(std::function<void()> task); // Processes accumulated tasks void flushTasks(); }; ```