Coinbase Software Engineer Coding & Algorithms Interview Questions
Practice the exact questions companies are asking right now.
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 ...
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...
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 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...
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 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...
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 Composable Range Iterators
Implement an iterator library: range(start, end, step= 1) supporting forward/backward iteration, inclusive/exclusive endpoints, negative steps, and ov...
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...
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...
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 ...
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...
Implement bank balance operations
Question Design and implement a Bank account class that supports the operations Deposit(amount), Withdraw(amount), and CashBack(percent). Ensure balan...
Process food delivery data queries
Question Given menus and restaurants, return the restaurant offering the lowest total price for an order and that is geographically closest. Given men...
Implement custom Java iterators
Question Implement, in Java and without IDE assistance, an Iterator interface and two concrete iterator classes that satisfy three given sub-problems,...