21 practice questions for Coinbase technical interviews
codingMediumVerified
Generate NFT
Category: String coding problem# Question You are designing an NFT generation engine. You are given a set of Traits, where each trait has a name and a list of possible...Input: List Output: Array
codingMediumVerified
Blockchain Mining
Category: Dynamic programming coding problem# Question You are building a block construction module for a blockchain node. The goal is to select a subset of pending transactions to include in...Input: Graph (nodes and edges) Output: Computed result
codingMediumVerified
Crypto Trading System Stream
Category: String coding problem# Question Design a crypto trading system that manages a stream of orders. The system should support various operations like placing, pausing,...Input: Array of strings Output: Computed result
codingHardVerified
Design Iterators
Category: Array coding problem# Question For this problem, you will be designing a series of different iterator classes. This problem is split into multiple related parts that...Input: Array of integers Output: Computed result
codingMediumVerified
Food Delivery System
Category: Trie-based coding problem# Question For this problem, you will be designing a food delivery system. This problem is split into three related parts, evolving from basic data...Input: List Output: Computed result
codingHardVerified
Transaction System
Category: Tree coding problemFor this problem, you will be designing a system to handle financial transactions and account balances. This problem is split into three related...Input: List Output: Integer
codingHardVerified
OA[CodeSignal] Cloud File Storage System
Category: Graph coding problem# Question Your task is to implement a simple in-memory cloud storage system that maps objects (files) to their metadata (name, size, etc.). You...Input: Graph (nodes and edges) Output: Array
codingHardVerified
OA[CodeSignal] Design Banking System
Category: Graph coding problem# Question Design a banking system that supports account management, transactions, and various financial operations.Input: Graph (nodes and edges) Output: Computed result
codingHardVerified
Capital Gains Tax Calculator
Category: String coding problemYou are given a chronologically sorted list of stock transactions. Each transaction is a list of strings in the format `[<timestamp>, <type>,...Input: Array of strings Output: Computed result
codingMediumVerified
Service Log Aggregator
Category: Trie-based coding problemA distributed system emits log entries from multiple services and worker threads. Each log entry is a colon-separated string in the format...Input: Array Output: Computed result
codingHardVerified
OA [CodeSignal] Knowledge Base System
Category: Graph coding problemDesign and implement a personal knowledge base called KnowledgeBaseSystem that stores articles with CRUD operations. The system operates entirely...Input: Graph (nodes and edges) Output: Computed result
codingMediumVerified
OA [CodeSignal] Workspace Tracker
Category: Interval-based coding problemBuild a system to track desk workers at a shared office space. The system records when each worker enters and leaves and computes how long they have...Input: String Output: Array
codingHardVerified
Transaction Query Engine
Category: String coding problemDesign a system to filter and paginate a list of transaction records. Each record is a list of strings in the format `[timestamp, id, userId,...Input: Array of strings Output: Computed result
codingMediumVerified
Exchange Rate Finder
Category: String coding problemYou are given a set of currency exchange relationships. Each relationship specifies a direct exchange rate between two currencies. Rates are...Input: List Output: Computed result
codingHardVerified
Order Matching Engine
Category: String coding problemYou are managing a cryptocurrency order book. The book holds buy and sell orders placed by traders. - A buy order indicates the maximum price a...Input: String Output: Computed result
codingHardVerified
Account Transfer System
Category: String coding problemYou are given a list of fund transfer instructions and a set of accounts with initial balances. Each transfer moves a fixed percentage of the...Input: List Output: Computed result
codingHardVerified
Restaurant Delivery Network
Category: String coding problemYou are building a food discovery platform. Given a user's location, a list of restaurants with their coordinates, and a menu of items with prices,...Input: List Output: Computed result
system designSeniorapi design
[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 designSeniorcaching
[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.
codingSeniorsliding window
[OA] Sliding Window — track active crypto markets over time
In the ever-changing world of cryptocurrency, it's crucial for Coinbase to determine the number of distinct markets that remain active within any given time frame. Problem statement: Given an array of timestamps when markets were opened and closed, and a d days window, compute the total number of distinct markets open during that window. - Function signature: def count_active_markets(timestamps: List[Tuple[int, int]], d: int) -> int: returns an integer count of active markets.Example 1: Input: timestamps = [(1, 5), (2, 3), (4, 6)], d = 3 Output: 2 Explanation: Markets 1 and 2 overlap in the window [1, 4].Example 2: Input: timestamps = [(1, 2), (3, 5), (7, 10)], d = 3 Output: 1 Explanation: Only one market is active at any time in the window 1 to 4.Constraints: - 1 <= timestamps.length <= 1000 - 1 <= d <= 10000 - Timestamps are unique.
codingSeniorgraph
[OA] Graph Traversal — Find the shortest path for crypto transactions
In Coinbase's ecosystem, efficient transaction routing is crucial for timely processing. The goal is to determine the shortest path between users in a peer-to-peer transaction graph. Problem statement: Given a directed graph representing users and their transactions as edges, write a function to find the shortest path from the source user to the destination user. Users can have multiple transactions but there is a constraint on transaction types that can be traversed. - Function signature: def shortest_path(transactions: List[Tuple[int, int]], source: int, destination: int) -> List[int]: returns a list of users representing the shortest path.Example 1: Input: transactions = [(1, 2), (2, 3), (2, 4), (3, 4)] Output: [1, 2, 3] Explanation: The path from user 1 to user 3 is through user 2.Example 2: Input: transactions = [(1, 2), (1, 3), (3, 4), (2, 4)] Output: [1, 3, 4] Explanation: The path from user 1 to user 4 is through user 3.Constraints: - 1 <= transactions.length <= 100 - 1 <= source, destination <= 10^4 - All transactions are unique.
Start practicing Coinbase questions
Sign up for free to access walkthroughs, AI-generated questions, and more.