← Dropbox Interview Insights

Dropbox·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Got a Dropbox SWE problem that's basically adversarial Wordle with a twist: the host can swap the hidden word after each guess as long as it stays consistent with what's been revealed. Took me a while to even understand what 'optimal' meant here since you're not just solving a word, you're forcing the adversary into a corner.

Questions Asked (1)

Q1

You have a set of distinct lowercase words of equal length. An adversarial host picks one but can switch to any consistent word after each guess. Each turn you guess one new letter and the host reveals where it appears (or says it's absent if some valid word lacks it). What is the minimum number of letter guesses needed to guarantee identifying the hidden word, assuming optimal guessing strategy?

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

This one messed with my head for a bit.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Model the problem as an adaptive decision tree where each guess partitions the remaining candidate words based on the host's response. The minimum number of guesses is the depth of the optimal decision tree, which can be found by minimizing the maximum number of remaining candidates after each guess. Use information theory to lower-bound and search over possible letter guesses to find the exact minimum for the given word set.

Pro tip: Clarify that the host's adversarial switching means you must guarantee identification for all consistent words, so the strategy must be robust to worst-case responses. Mention that the answer depends on the specific set of words, and for small sets you can compute it via exhaustive search or dynamic programming.

1. Understand the problem constraints

Restate that words are distinct, equal length, lowercase, and the host can switch to any word consistent with all previous guesses. The goal is to minimize the worst-case number of guesses.

2. Model as a decision tree

Each guess (a letter) partitions the current candidate set into subsets based on the host's response (which positions contain the letter, or absent). The worst-case number of guesses is the depth of the tree.

3. Compute lower bound via information theory

The number of possible responses to a guess is at most (length+1) possibilities (absent or appears in one of the positions). Thus, with k guesses, you can distinguish at most (length+1)^k words. So k >= ceil(log_{length+1}(N)).

4. Find optimal strategy and exact minimum

For a given word set, search over possible letter guesses to minimize the maximum remaining candidates. Use recursion or dynamic programming to compute the exact minimum depth. For small sets, this is feasible.

5. Discuss trade-offs and practical considerations

Mention that the optimal strategy may not be unique, and that the problem is computationally hard for large sets. In an interview, focus on the modeling and lower bound, and if needed, propose a greedy heuristic.

Key Points to Mention

  • Adaptive decision tree and worst-case analysis
  • Information-theoretic lower bound: log base (L+1) of N
  • Host's adversarial switching means all consistent words must be considered
  • Partitioning of candidate set based on response pattern
  • Exact minimum may require exhaustive search for small sets
  • Trade-off between optimality and computational feasibility

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