Robbie Hatley’s Solutions, in Perl, for The Weekly Challenge #371 (“Missing Letter” and “Subset Equilibrium”)
For those not familiar with "The Weekly Challenge", it is a weekly programming puzzle with two parts, with a new pair of tasks each Monday. You can find it here: The Weekly Challenge The Weekly Challenge for the week of 2026-04-27 through 2026-05-03 is #371. The tasks for challenge #371 are as follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Task 371-1: Missing Letter Submitted by: Reinier Maliepaard You are given a sequence of 5 lowercase letters, with one letter replaced by ‘?’. Each letter maps to its position in the alphabet (‘a = 1’, ‘b = 2’, …, ‘z = 26’). The sequence follows a repeating pattern of step sizes between consecutive letters. The pattern is either a constant step (e.g., ‘+2, +2, +2, +2’) or a simple alternating pattern of two distinct steps (e.g., ‘+2, +3, +2, +3’). Example inputs: ("ac?gi", "ad?jm", "ae?mq", "acf?k", "beg?l") Expected outputs: e g i ...