© 2026 Hedgehog Software, LLC
public static int? Closest(int[] arr) { var min = arr.Distinct().Where(x => Math.Abs(x) == arr.Min(Math.Abs)); return min.Count() == 1 ? min.First() : (int?) null; }