Robbie Hatley's Solutions, in Perl, for The Weekly Challenge #340 (“Duplicate Removals” and “Ascending Numbers”)
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 2025-09-22 through 2025-09-28 is #340. The tasks for challenge #340 are as follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Task 340-1: Duplicate Removals Submitted by: Mohammad Sajid Anwar You are given a string consisting of lowercase English letters. Write a script to return the final string after all duplicate removals have been made. Repeat duplicate removals on the given string until we no longer can. A duplicate removal consists of choosing two adjacent and equal letters and removing them. Example #1: Input: 'abbaca' Output: 'ca' Step 1: Remove 'bb' => 'aaca' Step 2: Remove 'aa' => 'ca' Example #2: Input: 'azxxzy' Output: 'ay' Step 1: Remove 'xx...