Meta DevOps engineer interviews cover CI/CD pipelines, infrastructure as code, container orchestration, monitoring, and incident response procedures.
s and an integer n, find the length of...Input: Stringnumbers, count all elements that are not equal to numbers[0] or numbers[1] (if those indices exist in the...Input: Array of integerstext consisting of unique lowercase English words separated by spaces. For each word, compute the absolute...Input: Arraylocations representing the...Input: Array of integers+ and -, and parentheses ( and ), simplify...Input: StringConfigManager class that handles configuration loading and updates.Problem statement: Define the ConfigManager class that stores configurations for different services and provides methods to retrieve and update these configurations.def __init__(self): Initializes the configuration manager.def set_config(self, service_id: str, config: Dict[str, Any]) -> None: Sets or updates the configuration for a specific service.def get_config(self, service_id: str) -> Dict[str, Any]: Retrieves the configuration for a specific service.Example 1:config_manager = ConfigManager(); config_manager.set_config('auth_service', {'retry_limit': 3}); config = config_manager.get_config('auth_service'){'retry_limit': 3}1 <= service_id.length <= 10010^4 key-value pairs.HealthMonitor that allows registering services and conducting regular health checks.def __init__(self): Initializes the health monitor.def register_service(self, service_id: str) -> None: Registers a new service to monitor.def health_check(self, service_id: str) -> bool: Conducts a health check and returns the service's health; returns True or False.Example 1:monitor = HealthMonitor(); monitor.register_service('user_service'); status = monitor.health_check('user_service')True1 <= service_id.length <= 10010^5 service registrations.FROM base_image:latest Base image to start from.RUN ... Command that installs dependencies.COPY ... Command that copies application code.ENTRYPOINT ... Command that defines the startup behavior of the container.Example 1:TerraformStateManager that keeps track of the state of various resources, allows updates to the state, and can retrieve states efficiently.def __init__(self): Initialize the state manager.def add_resource(self, resource_id: str, state: Any) -> None: Add or update a resource's state.def get_resource(self, resource_id: str) -> Any: Retrieve the state of a specific resource.Example 1:manager = TerraformStateManager(); manager.add_resource('db_instance', {'status': 'running'}); state = manager.get_resource('db_instance'){'status': 'running'}1 <= resource_id.length <= 10010^4 resources.Sign up for free to access walkthroughs, AI-generated questions, and more.
Get Started Free