Coinbase Coding & Algorithms Interview Questions
Master your tech interview with our curated database of real questions from top companies.
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...
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 ...
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 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 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 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 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...
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...
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 ...
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 bank balance operations
Question Design and implement a Bank account class that supports the operations Deposit(amount), Withdraw(amount), and CashBack(percent). Ensure balan...
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 ...