Gamified challenge · Frequency counting
Every lowercase letter of message was turned forward the same number of places round the alphabet (z wraps to a); spaces, digits and punctuation were left alone. In English, e is the most common letter, so: find the most common letter in the message (if several tie, take the one that comes first in the alphabet), assume it was e, and turn every letter back by that many places.
Write decode(message) that returns the decoded message. For "wkh ghhu qhhgv juhhq wuhhv" the most common letter is h, 3 places after e, so the answer is "the deer needs green trees". A message with no letters comes back unchanged.
This game is part of the paid plans. Sign in, then pick a plan to write your answer, watch it play out, and step through the algorithm with its guide.
Sign in with Google