Coinbase's engineering interview leans pragmatic: solid data-structures-and-algorithms, but also a practical, real-world exercise (build or extend something close to production code) and a consistent thread of security and correctness awareness — fitting for a company handling financial assets. Clean, defensible code that you can reason about under follow-ups matters more than exotic algorithms.
Here's the full loop with four worked problems and the habits Coinbase rewards.
The full interview process
| Stage | Format | Notes |
|---|---|---|
| Recruiter screen | 30 min | Background, team, values fit |
| Technical phone screen | 45-60 min | DS&A, sometimes a practical task |
| Practical / pairing round | 60 min | Build or extend real-world code |
| DS&A onsite | 45-60 min | Medium problems, clean code |
| System design + behavioral | 45 min each | Scale, security, Coinbase values |
Valid Parentheses (stack)
Question: Given a string of brackets, determine if they are validly matched and nested.
Push opening brackets; on a closing bracket, verify it matches the top of the stack. An empty stack at the end means valid.
def isValid(s):
pairs = {')': '(', ']': '[', '}': '{'}
stack = []
for ch in s:
if ch in pairs:
if not stack or stack.pop() != pairs[ch]:
return False
else:
stack.append(ch)
return not stack
O(n) time, O(n) space. Edge cases graded: a closing bracket with an empty stack, and a non-empty stack at the end.
Merge Intervals (sorting)
Question: Merge all overlapping intervals.
Sort by start; sweep, extending the last merged interval when the next one overlaps.
def merge(intervals):
intervals.sort(key=lambda x: x[0])
merged = []
for start, end in intervals:
if merged and start <= merged[-1][1]:
merged[-1][1] = max(merged[-1][1], end)
else:
merged.append([start, end])
return merged
O(n log n). The classic bug is merged[-1][1] = end instead of max(...), which breaks on a fully-contained interval.
Number of Islands (BFS/DFS)
Question: Count islands of connected '1' cells in a grid.
Flood-fill each unvisited land cell and count the fills.
def numIslands(grid):
rows, cols = len(grid), len(grid[0])
count = 0
def sink(r, c):
if 0 <= r < rows and 0 <= c < cols and grid[r][c] == '1':
grid[r][c] = '0'
sink(r+1,c); sink(r-1,c); sink(r,c+1); sink(r,c-1)
for r in range(rows):
for c in range(cols):
if grid[r][c] == '1':
count += 1; sink(r, c)
return count
O(rows×cols). Mark visited by mutating the grid, or a separate set if it's read-only.
LRU Cache (design)
Question: Design a Least-Recently-Used cache with O(1) get and put.
A hash map for lookup plus a recency order. Python's OrderedDict gives both; be ready to build the doubly linked list by hand.
from collections import OrderedDict
class LRUCache:
def __init__(self, capacity):
self.cache = OrderedDict(); self.cap = capacity
def get(self, key):
if key not in self.cache: return -1
self.cache.move_to_end(key); return self.cache[key]
def put(self, key, value):
if key in self.cache: self.cache.move_to_end(key)
self.cache[key] = value
if len(self.cache) > self.cap: self.cache.popitem(last=False)
O(1) get and put. Interviewers often ask for the manual doubly-linked-list version — practice the sentinel-node form.
Patterns Coinbase asks most
| Pattern | Frequency | Note |
|---|---|---|
| Arrays & hashing | ~25% of loops | Counting, grouping, intervals |
| Practical / real-world coding | ~20% | Build-and-extend exercises |
| Graphs / BFS-DFS | ~15% | Grids, connectivity |
| Object-oriented design | ~15% | Caches, services |
| Strings / stack | ~15% | Parsing, validation |
| Correctness & edge cases | ~10% | Money/precision, security framing |
Common pitfalls specific to Coinbase
- Ignoring correctness and edge cases. Coinbase handles money — off-by-ones, precision, and validation are scrutinized.
- Over-engineering the practical round. Ship a clean, working solution; defend your choices under follow-ups.
- Forgetting security framing. Mention input validation and failure modes even when not explicitly asked.
- Weak values fit. Coinbase weights its mission and values; have genuine motivation ready.
A 4-week prep plan for a Coinbase loop
- Week 1: Arrays, hashing, strings, and graphs — clean, well-tested mediums.
- Week 2: Practical/build-and-extend exercises with strong edge-case and validation habits.
- Week 3: System design with a security lens, using the cheat sheet.
- Week 4: Values-fit stories and a live-coding rehearsal.
Write defensible code with live AI support
CoPilot Interview surfaces structured solutions in about 4 seconds during real Zoom and Teams calls. Free for Windows and macOS, invisible on screen-share.
Download freeFAQ
What's distinctive about Coinbase's coding interview?
It's pragmatic and real-world: alongside data-structures problems you'll get a practical exercise (build or extend production-like code) and a consistent thread of security and correctness awareness, fitting a company that handles financial assets. Clean, defensible code beats clever tricks.
How important is correctness at Coinbase?
Very - because Coinbase handles money, edge cases, numeric precision, input validation, and failure modes are scrutinized more than at a typical product company. Mention these proactively even when not explicitly asked.
Does Coinbase have a take-home or practical round?
Often, yes - a practical or pairing round where you build or extend real-world code in about an hour. The grading is on clean, working, defensible code and how you reason about it under follow-ups, not on exotic algorithms.
How hard are Coinbase coding questions?
The DS&A skews medium. The differentiators are the practical round, correctness and security awareness, and fit with Coinbase's mission and values rather than raw algorithmic difficulty.
Can CoPilot Interview help me prepare for Coinbase?
Yes. It returns clean, idiomatic solutions with Big-O and flags edge cases, which suits Coinbase's pragmatic, correctness-focused style. Follow Coinbase's interview rules during the live round.