Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2694. Event Emitter
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.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.