Robbie Hatley's Solutions, in Perl, for The Weekly Challenge #354 (“Min Abs Diff” and “Shift Grid”)
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-12-29 through 2026-01-04 is #354. The tasks for challenge #354 are as follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Task 354-1: Min Abs Diff Submitted by: Mohammad Sajid Anwar You are given an array of distinct integers. Write a script to find all pairs of elements with the minimum absolute difference. Rules (a,b): 1: a, b are from the given array. 2: a < b 3: b - a = min abs diff any two elements in the given array # Example inputs and corresponding expected outputs: ( # Example #1 input: [4, 2, 1, 3], # Expected output: [1, 2], [2, 3], [3, 4] # Example #2 input: [10, 100, 20, 30], # Expected output: [10, 20], [20, 30] # Example #3 input: [-5, -2, 0, 3], # Expected output: [-2, 0] # E...