Coinbase Software Engineer Coding & Algorithms Interview Questions
Master your tech interview with our curated database of real questions from top companies.
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 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 Composable Range Iterators
Implement an iterator library: range(start, end, step= 1) supporting forward/backward iteration, inclusive/exclusive endpoints, negative steps, and ov...
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...
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...
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...
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 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,...
Analyze food-delivery data
Question Food-delivery analytics tasks (three sub-questions). Given many restaurants and their menus, return the restaurant offering the lowest total ...
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 iterator classes
Question Implement an iterator from scratch in a blank coding environment. Define the iterator interface manually. Implement two concrete iterator cla...
Implement custom iterators and interfaces
Define a minimal Iterator interface (e.g., hasNext(), next()) for integers without using IDE-generated scaffolding. Implement two iterator classes in ...