Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Leetcode 379. Design Phone Directory
Design a data structure that manages a fixed pool of phone numbers (0..maxNumbers-1) supporting get (assign and return an available number), check (report if a number is available), and release (make a previously assigned number available again). The challenge is to support these operations efficiently (ideally O(1)) and correctly handle reuse of released numbers.
Asked at:
Apple
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Mid February, 2025
Apple
Senior
Variation of this problem to be used in the context of designing fixed size resource allocator
Mid September, 2024
Apple
Senior
Create a phone directory where given a phone number, you return the name (and vice versa)
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.