← Dropbox Interview Insights

Dropbox·Software Engineer·Technical Phone Screen·Senior

Senior
Jun 2026

Summary

Dropbox SWE interview that took the classic word-guessing game and made it adversarial. The twist was interesting enough that I kept second-guessing whether I was even solving the right problem.

Questions Asked (1)

Q1

You're building a word-guessing game where the word-selector is adversarial and can swap the secret word mid-game, as long as the new word stays consistent with all prior hit/miss feedback. The guesser wants to minimize the worst-case number of guesses. What's the strategy, and can you write pseudocode for it?

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

The adversarial framing is what got me.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Frame the problem as a minimax game where the guesser must choose guesses that minimize the maximum remaining candidate set size, and the adversary always picks the largest consistent subset. Explain that the optimal strategy is to guess a letter that splits the candidate set as evenly as possible, and provide pseudocode that maintains the candidate set and updates it based on feedback.

Pro tip: Mention that this is equivalent to building an optimal decision tree and that the worst-case number of guesses is at least log_2(N) where N is the initial number of words; showing awareness of information-theoretic lower bounds demonstrates depth.

1. Clarify the problem and constraints

Restate the adversarial model: the secret word can change as long as it remains consistent with all previous hit/miss feedback. Confirm that the guesser knows the full dictionary and that feedback is binary (hit/miss) per guess.

2. Model as a minimax game

Define the state as the set of words consistent with all feedback so far. The guesser chooses a guess to minimize the maximum number of remaining guesses; the adversary chooses a feedback response that maximizes it.

3. Derive the optimal strategy

At each step, for each possible guess, compute the sizes of the two subsets (hit and miss) and pick the guess that minimizes the larger subset. This greedy strategy is optimal for minimizing worst-case guesses.

4. Write pseudocode

Provide clear pseudocode that initializes the candidate set, loops until one word remains, selects the best guess by evaluating all possibilities, and updates the candidate set based on feedback.

5. Analyze complexity and trade-offs

Discuss time complexity (e.g., O(N * L * G) per guess where N is dictionary size, L is word length, G is alphabet size) and space complexity. Mention that precomputation or heuristics may be needed for large dictionaries.

Key Points to Mention

  • Minimax decision-making: minimize the maximum remaining candidate set size.
  • Information-theoretic lower bound: worst-case guesses ≥ ceil(log2(N)).
  • Greedy choice of guess that splits the candidate set most evenly.
  • Adversary can switch words, so the candidate set must always be updated to the largest consistent subset.
  • Pseudocode should include a loop that selects the best guess and updates the candidate set based on feedback.
  • Complexity considerations: evaluating all possible guesses can be expensive; discuss optimizations like precomputing letter frequencies or using heuristics.

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