It's interesting to see the edge cases where the algorithm struggles to find the last letter.
> shave: [slate: 20202, share: 22202, shame: 22202, shape: 22202, shake: 22202, shade: 22202]
I guess it needs to find the right choice of [r, m, p, k, d, v] to get "shave" (since 'v' is so rare it takes 6 guesses!). Trying "marks" and "paved" would narrow that list down in 2 guesses (and a third to actually try "shave")
Anyone code this up yet? (I haven't, I took a greedy approach too [0]). Wonder how to generalize such a plan.