Available question text
Implement an EventEmitter that maintains ordered listener lists per event name, supporting subscribe (adds a callback and returns an object with an unsubscribe method to remove that listener) and emit (calls all listeners in subscription order with given arguments and returns an array of their results, or an empty array if none). The key challenges are preserving listener order, allowing removal via unsubscribe, and returning the collected callback results.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2694. Event Emitter
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source