Airbnb backend engineer interviews typically focus on APIs, databases, system design, concurrency, caching, and data structures.
No verified questions yet for Airbnb.
MessageQueue class that handles messages related to bookings, ensuring that they are processed in the order they were received.MessageQueue with the following methods:void enqueue(BookingMessage message) - adds a new message to the queue.BookingMessage dequeue() - removes and returns the next message from the queue; returns null if the queue is empty.bool isEmpty() - checks if the queue is empty.Example 1:enqueue(new BookingMessage('booking1'))nulldequeue()booking1isEmpty()falseConstraints:10000 messages.Cache class that will manage property data in a manner that it can support common operations while ensuring high performance.Cache with the following methods:void put(String key, String value) - stores a value in the cache with the given key.String get(String key) - retrieves the value associated with a key, returning null if the key does not exist.void invalidate(String key) - removes the value for the key, if it exists.Example 1:put('listing1', 'property A')nullget('listing1')property Ainvalidate('listing1')nullget('listing1')nullConstraints:10000 entries.Sign up for free to access walkthroughs, AI-generated questions, and more.
Get Started Free