private static void MergeTwoSortedArrays() { var result = MergeHelper.MergeSortedArrays(new int[] { 2, 4, 6 }, new int[] { 3, 5 }); Console.WriteLine("Merged Array:"); foreach (var num in result) { Console.WriteLine(num); } }
private static void MergeNSortedArrays() { var result = MergeHelper.MergeNSortedArrays(new int[3][] { new int[] { 2, 4, 6 }, new int[] { 1, 3, 5 }, new int[] { 7, 8, 9 } }); foreach (var num in result) { Console.Write($"{num} "); } }