Patreon·Software Engineer·Technical Phone Screen
- Given a guess string and a target string of equal length, compute a feedback string where each character is G (green, exact match), Y (yellow, letter exists elsewhere in target but not already matched), or W (white, not present). Handle repeated letters correctly so each target letter can only be claimed once.
- Extend the evaluator so that after each round, letters confirmed fully absent from the target are tracked, and any future guess containing those letters is flagged as invalid. A letter is only confirmed absent if every instance of it in that guess was marked W.
“The green pass first, then yellows thing is the key insight and I actually got there pretty fast.”