Coinbase logo

Coinbase Software Engineer System Design Questions

51 practice questions for Coinbase Software Engineer interviews

Coinbase software engineer interviews cover algorithms, data structures, system design, and coding problems drawn from real interview rounds.

All Roles Software Engineer Backend Engineer Frontend Engineer Full Stack Engineer Mobile Engineer Data Engineer Data Scientist ML Engineer DevOps Engineer DevOps Engineer Product Manager SRE Security Engineer Engineering Manager Data Analyst UX/UI Designer QA Engineer

No verified questions yet for Coinbase.

system design Senior api design #1

1. [OA] Twitter Feed — Design a user feed for Coinbase's social trading features

As Coinbase looks to integrate social features for trading, it's essential to design a system that tracks user feeds efficiently.
Problem statement: Design a class to manage a user's feed. Supports the following methods: 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.
- Method signatures:
- 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.
Example 1:
Input: manager = FeedManager()
manager.follow(1, 2)
manager.follow(1, 3)
manager.get_feed(1)
Output: [x, y, z]
Constraints:
- 1 <= follower_id, followee_id <= 10^4
- Transaction history size can be up to 10^5.
system design Senior caching #2

2. [OA] LRU Cache — Design a caching layer for Coinbase's API responses

In order to optimize data retrieval times and minimize database load, Coinbase requires an LRU cache to manage frequent API requests efficiently.
Problem statement: Design and implement a class that represents an LRU Cache with a fixed capacity. Supports get(key: int) -> int and put(key: int, value: int) -> void methods.
- Method signatures:
- 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.
Example 1:
Input: cache = LRUCache(2)
cache.put(1, 1)
cache.put(2, 2)
cache.get(1)
Output: 1
cache.put(3, 3)
cache.get(2)
Output: -1
Constraints:
- 1 <= capacity <= 3000
- 0 <= key, value <= 10^4.

Related Coinbase Software Engineer interview prep

Start practicing Coinbase questions

Sign up for free to access walkthroughs, AI-generated questions, and more.

Get Started Free