Airbnb DevOps engineer interviews cover CI/CD pipelines, infrastructure as code, container orchestration, monitoring, and incident response procedures.
No verified questions yet for Airbnb.
LRUCache class that provides an API for setting and getting values while maintaining the least recently used order.def __init__(self, capacity: int) -> None: Initializes the cache with a given capacity.def get(self, key: int) -> int: Retrieves the value associated with key, returning -1 if it does not exist.def put(self, key: int, value: int) -> None: Updates or inserts the value for key and makes it the most recently used item.capacity = 2, commands = [(put, 1, 1), (put, 2, 2), (get, 1), (put, 3, 3), (get, 2), (put, 4, 4), (get, 1), (get, 3), (get, 4)][None, None, 1, None, -1, None, -1, 3, 4]HealthMonitor that maintains a binary tree structure of services, allowing traversal and health-checking of each service node based on different conditions.def __init__(self, service_id: str) -> None: Initializes a service with the given ID.def add_service(self, service_id: str, parent_id: str) -> None: Adds a child service under a specified parent service.def check_health(self) -> List[str]: Returns a list of service IDs that are unhealthy based on some predefined health criteria.Service Structure: A -> B -> C (A as root)['B', 'C']Sign up for free to access walkthroughs, AI-generated questions, and more.
Get Started Free