Coinbase Coding & Algorithms Interview Questions
Practice the exact questions companies are asking right now.
Solve Aptitude Test: Logical, Numerical, Verbal Reasoning
Scenario Pre-employment aptitude screen assessing logical, numerical and verbal reasoning within a strict time limit Question You have 15 minutes to s...
Implement cloud storage with quotas and compression
Problem Implement an in-memory cloud storage service that supports multiple users, per-user storage quotas, changing quotas with eviction, and file co...
Solve restaurant path and order event tasks
You are given two independent coding tasks. Task 1: Shortest paths in a restaurant grid Context: A restaurant is represented as a 2D grid. The waiter ...
Design crypto trading order control API
You are implementing part of a simple crypto trading system that manages client orders. Each order can be in one of several states: NEW, ACTIVE, PAUSE...
Paginate forward and backward through results
You are asked to extend a basic pagination system to support forward and backward navigation, similar to a cursor-based API. You are given: - A zero-i...
Implement basic pagination for a list
You are given: - A zero-indexed array of items items (you can assume it fits in memory). - An integer pageSize > 0. Design and implement a pagination ...
Write SQL to rank top products per category
You are given two tables: products - product_id (int, primary key) - category (string) order_items - order_id (int) - product_id (int) - quantity (int...
Implement a versioned recipe management system
You are asked to implement an in-memory Recipe Management System (similar in difficulty to a simple banking/in-memory DB exercise). The system support...
Design an in-memory database with TTL and backups
You are asked to implement a small in-memory “database” that evolves across 4 parts. In each part you may reuse your previous code and only add/extend...
Detect sequence rule and repair anomaly
Implement next_value(seq: list[int]) that detects the rule of a numeric sequence and returns a tuple (model_name, parameters, anomaly_index_or_None, n...
Implement a Simple Banking Ledger
Design and implement a banking ledger for n accounts labeled 1..n with initial balances. Provide an API: deposit(id, amount) -> bool, withdraw(id, amo...
Maximize profit with transaction fees
You are given an array prices where prices[i] is the price of a stock on day i and an integer fee representing the commission charged when you sell. Y...
Implement banking ops: transfer, top-k, cashback, merge
Design and implement an in-memory banking system that supports: ( 1) CreateAccount(id, initialBalance) and Transfer(fromId, toId, amount) with validat...
Implement Composable Range Iterators
Implement an iterator library: range(start, end, step= 1) supporting forward/backward iteration, inclusive/exclusive endpoints, negative steps, and ov...
Generate Weighted Random NFTs with Updates
You manage k NFT types, each with a positive integer rarity weight w[i]. Implement a minter: constructor(w) builds any needed structures in O(k); mint...
Implement top-K over a stream
Given a high-volume stream of events (e.g., account IDs from new account openings), design and implement a data structure that supports: ( 1) insertin...
Maximize profit with transaction fee
Given an array of daily stock prices and a fixed transaction fee charged on each sell, compute the maximum profit achievable with any number of buy–se...
Compute top-K branches by openings
Given a stream of account-opening events (branch_id, user_id, timestamp), design algorithms and data structures to compute the top-K branches by numbe...
Count users over n connections
Given a stream of relationship events in the form [[user_a, user_b, op], ...], where op ∈ {"connect", "disconnect"}, treat connections as undirected e...
Recommend movies by shared ratings
Write a function recommendations(user, ratings) that returns a list of movies to recommend to the given user based on shared preferences. Each rating ...