Airbnb software engineer interviews cover algorithms, data structures, system design, and coding problems drawn from real interview rounds.
No verified questions yet for Airbnb.
class TwitterFeed:def __init__(self): - Initializes the object.def post(self, user_id: int, post: str): - Creates a new post for the specified user.def follow(self, follower_id:int, followee_id:int): - Allows one user to follow another.def get_feed(self, user_id: int) -> List[str]: - Retrieve the latest n posts from followed users.Example 1:1 <= user_id <= 10^4posts per user = 100followed users = 50capacity. The cache should support get(key) and put(key, value) operations.class LRUCache:def __init__(self, capacity: int): - Initializes the LRUCache with the maximum capacity.def get(self, key: int) -> int: - Returns the value of the key if the key exists in the cache, otherwise return -1.def put(self, key: int, value: int): - Update the value of the key if it exists, otherwise add the key-value pair to the cache. When the cache reaches its capacity, it should invalidate the least recently used item before inserting a new item.Example 1:1 <= capacity <= 30000 <= key <= 10^40 <= value <= 10^4Sign up for free to access walkthroughs, AI-generated questions, and more.
Get Started Free