Coinbase software engineer interviews cover algorithms, data structures, system design, and coding problems drawn from real interview rounds.
No verified questions yet for Coinbase.
follow(follower_id: int, followee_id: int), unfollow(follower_id: int, followee_id: int), and get_feed(user_id: int) -> List[int]. The feed should return the most recent 10 transactions from the followed users.def follow(follower_id: int, followee_id: int) -> None: update the following relationship.def unfollow(follower_id: int, followee_id: int) -> None: remove the following relationship.def get_feed(user_id: int) -> List[int]: return the user feed containing transaction IDs of the most recent 10 transactions from followed users.manager = FeedManager() manager.follow(1, 2) manager.follow(1, 3) manager.get_feed(1) [x, y, z] 1 <= follower_id, followee_id <= 10^4 10^5.get(key: int) -> int and put(key: int, value: int) -> void methods.def get(key: int) -> int: returns the value of the key if it exists or -1.def put(key: int, value: int) -> None: updates the value if the key exists, otherwise, adds the key-value pair to the cache. If the cache reaches its capacity, it should invalidate the least recently used item before inserting a new item.cache = LRUCache(2) cache.put(1, 1) cache.put(2, 2) cache.get(1) 1 cache.put(3, 3) cache.get(2) -1 1 <= capacity <= 3000 0 <= key, value <= 10^4.Sign up for free to access walkthroughs, AI-generated questions, and more.
Get Started Free