← Coinbase Interview InsightsSoftware Engineer

Coinbase·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Coinbase coding screen with a combinatorics problem that sounds easy until you think about the output size. Decent problem, nothing too tricky if you've done recursive enumeration before.

Questions Asked (1)

Q1

Given a set of attribute categories (like ear, eye, background), each with multiple possible values, generate all possible NFT designs by computing the Cartesian product across categories. How would you implement this, and what happens when the output is too large to fit in memory?

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

I went straight to DFS and it worked fine for the core implementation.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by explaining the Cartesian product algorithm using recursion or iterative expansion, then discuss memory implications and strategies for handling large outputs such as streaming, lazy evaluation, or external sorting. Emphasize trade-offs between memory usage, time complexity, and practicality in a production environment like Coinbase.

Pro tip: Demonstrate awareness of real-world constraints: NFT generation often involves millions of combinations, so propose a streaming API or generator that yields designs one at a time, and discuss how to parallelize or distribute the generation if needed.

1. Clarify requirements and constraints

Ask about the expected number of categories and values, whether all combinations are needed at once, and if there are memory or time limits. This shows you consider the context before diving into code.

2. Describe the basic Cartesian product algorithm

Explain how to compute the product using nested loops or recursion, and mention that the total number of combinations is the product of the sizes of each category.

3. Analyze memory and scalability issues

Discuss that storing all combinations in memory is infeasible for large sets, and outline the time complexity (O(N) where N is total combinations) and space complexity (O(N) if stored).

4. Propose memory-efficient solutions

Suggest using a generator or iterator to yield combinations one by one, streaming to disk or a database, or using external sorting if order matters. Mention lazy evaluation and backpressure.

5. Discuss distributed or parallel processing

If the output is extremely large, consider partitioning the problem across multiple machines or using map-reduce to generate and process combinations in parallel.

Key Points to Mention

  • Cartesian product definition and calculation (product of category sizes)
  • Recursive vs iterative implementation and their trade-offs
  • Time and space complexity analysis (O(N) time, O(N) space if stored)
  • Generator/iterator pattern for lazy evaluation and streaming
  • External storage or database for persisting large outputs
  • Parallelization and distributed computing for scalability

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