Riddler Classic, September 18 2020

I wrote up a gist for last week’s Riddler Express, including the extra credit, but forgot to link it here, probably because I was on holiday! Anyway, this week’s Classic looked very tractable.

What isn’t mentioned in my code is that I assume we can replace words with their alphabetical positions in the list of words, but once we do that, the algorithm is one of the simplest.  “The dumbest thing that could possibly work” is to use a binary search to guess the word, and repeat that process for every word.

The one problem I had when solving was convincing myself that the answer I was generating was correct. I was thrown off a little by the example in the question, with nine guesses. I had to convince myself that this was unusual by remembering that binary search is a log2 n approach.

Leave a Reply

Your email address will not be published. Required fields are marked *

I accept that my given data and my IP address is sent to a server in the USA only for the purpose of spam prevention through the Akismet program.More information on Akismet and GDPR.

This site uses Akismet to reduce spam. Learn how your comment data is processed.