← Coinbase Interview Insights

Coinbase·Software Engineer·Online Assessment (OA)·Intermediate

Intermediate
Jun 2026

Summary

Coinbase software engineer interview, looks like an online assessment style problem centered on NFT tooling. One question, pretty well-scoped, but the constraint about not using retry-based sampling is where most people probably trip up.

Questions Asked (1)

Q1

Build an NFT metadata generator that takes a collection config and a seed, then outputs N unique trait combinations as JSON. If N exceeds the total possible combinations, return an error. Generation must be deterministic and you cannot use a retry-until-unique approach.

Algorithms & Data StructuresSystem DesignTechnical Trade-offs
Author's notes

The seed-based determinism part is straightforward enough, but the 'no repeated sampling' constraint is what makes this interesting.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then propose a deterministic algorithm that maps a seed to unique combinations without retries. Use combinatorial ranking (e.g., factoradic or mixed-radix) to directly index into the combination space, and validate N against the total possible combinations upfront.

Pro tip: Mention that you would use a seeded PRNG (like xorshift or Mersenne Twister) for deterministic shuffling, but avoid modulo bias by using rejection sampling or a permutation-based approach. Also, discuss how to handle large N efficiently with streaming or lazy generation.

1. Clarify Requirements and Constraints

Ask about the expected size of N, the number of traits and values, and whether the output order matters. Confirm that determinism means the same seed and config always produce the same set of NFTs.

2. Compute Total Combinations and Validate N

Calculate the Cartesian product of all trait values to get the total possible unique combinations. If N exceeds this total, return an error immediately.

3. Design Deterministic Unique Selection

Use a combinatorial number system (e.g., factoradic) to map a seed-derived index to a unique combination without collision. Alternatively, generate a deterministic permutation of all combinations and take the first N.

4. Implement Generation and Output

For each of the N indices, decode the index into trait values using mixed-radix conversion, then assemble the JSON metadata. Ensure the process is efficient and scalable.

5. Discuss Trade-offs and Edge Cases

Address performance for large combination spaces, memory usage, and how to handle seed changes. Mention potential biases and how to avoid them.

Key Points to Mention

  • Deterministic PRNG seeding and its role in reproducibility
  • Combinatorial ranking/unranking (factoradic or mixed-radix) for direct indexing
  • Avoiding modulo bias when mapping random numbers to a range
  • Efficient validation of N against total combinations using multiplication
  • Trade-offs between generating all combinations vs. lazy generation
  • Handling large N and memory constraints with streaming or chunking

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