← Coinbase Interview Insights

Coinbase·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jul 2026

Summary

Coinbase coding screen with a combinatorics problem that sounds deceptively simple until you start thinking about scale. Pretty algorithmic for a crypto company but not surprising given their engineering bar.

Questions Asked (1)

Q1

Given a set of NFT attribute categories (like ear, eye, background), each with multiple possible values, generate all possible NFT designs by computing the Cartesian product across categories. How do you handle cases where the total number of combinations is too large to fit in memory?

Algorithms & Data StructuresTechnical Trade-offsSystem Design
Author's notes

I went straight to recursion, which worked fine for the basic case.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by explaining the Cartesian product and its exponential growth, then discuss memory-efficient approaches like lazy generation or streaming. Emphasize trade-offs between time, memory, and randomness, and how to adapt based on constraints.

Pro tip: Mention that for NFT generation, you often need random sampling without replacement, so you can use combinatorial number system to map indices to combinations, avoiding full enumeration. This shows practical insight beyond textbook algorithms.

1. Clarify requirements and constraints

Ask about the expected number of categories and values, memory limits, and whether all combinations need to be generated or just a random subset. This determines the approach.

2. Explain the Cartesian product and its complexity

Describe how the total combinations = product of category sizes, which can be astronomically large. Mention that storing all in memory is infeasible for large sets.

3. Propose memory-efficient generation strategies

Discuss lazy evaluation (generators), streaming, or iterative approaches that produce combinations on-the-fly without storing all. For random access, use combinatorial number system to map an index to a combination.

4. Address random sampling and uniqueness

If only a subset is needed, explain how to randomly sample indices without replacement and convert to combinations, ensuring no duplicates. Mention reservoir sampling or hash-based approaches if needed.

5. Discuss trade-offs and scalability

Compare time vs. memory, and when to use distributed processing or external storage. Highlight that the choice depends on whether you need all combinations or just a sample.

Key Points to Mention

  • Cartesian product and exponential growth (product of category sizes)
  • Lazy evaluation / generators to avoid storing all combinations
  • Combinatorial number system for index-to-combination mapping
  • Random sampling without replacement for NFT generation
  • Trade-offs between time, memory, and randomness
  • Distributed or external storage for extremely large sets

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.