ByteDance DevOps engineer interviews cover CI/CD pipelines, infrastructure as code, container orchestration, monitoring, and incident response procedures.
No verified questions yet for ByteDance.
real-time and historical data on service performance.1000 services at peak load.get and put operations.Problem statement:def get(self, key: int) -> int:: Get the value of the key if the key exists in the cache, otherwise return -1.def put(self, key: int, value: int) -> None:: Update the value of the key or insert the key if it is not already present. When the cache reaches its capacity, it should invalidate the least recently used item before inserting the new item.Example 1:cache = LRUCache(2)cache.put(1, 1)cache.put(2, 2)cache.get(1)11Example 2:cache.put(3, 3)cache.get(2)-12 and returns -1.Constraints:3000.1 <= key,value <= 10^4.365 days.Dockerfile.Dockerfile that is unnecessarily large and slow to build. Your goal is to refactor this Dockerfile to reduce the image size and improve build time.Example 1:DockerfileDockerfileBase image must be python:3.8.100MB.50%.Sign up for free to access walkthroughs, AI-generated questions, and more.
Get Started Free