Coinbase backend engineer interviews typically focus on APIs, databases, system design, concurrency, caching, and data structures.
No verified questions yet for Coinbase.
MessageQueue class that allows adding messages, retrieving the next message, and checking the size of the queue.class MessageQueue:def enqueue(message: str) -> None – Adds a message to the queue.def dequeue() -> str – Retrieves and removes the next message from the queue.def size() -> int – Returns the current size of the queue.enqueue('msg1')Nonesize()11 <= len(message) <= 100JobScheduler class that schedules jobs to run after a defined interval. It should allow for adding, removing, and checking job status.class JobScheduler:def add_job(job_id: str, interval: int) -> None – Adds a job with a specified interval (in seconds).def remove_job(job_id: str) -> None – Removes a job from the scheduler.def get_status(job_id: str) -> str – Returns the current status of a job (e.g. 'running', 'pending', 'completed').add_job('job1', 5)Noneget_status('job1')'pending'1 <= interval <= 36001 <= len(job_id) <= 20Sign up for free to access walkthroughs, AI-generated questions, and more.
Get Started Free