static void TestTwoSum() { var numbers = new int[] { 2, 7, 11, 15 }; var result = HashTableExercises.TwoSum(numbers, 9); foreach (var index in result) { Console.Write(index + " "); } }
static void TestCountPairsWithDiff() { var numbers = new int[] { 1, 7, 5, 9, 2, 12, 3 }; Console.WriteLine(HashTableExercises.CountPairsWithDiff(numbers, 2)); }
static void TestMostFrequent() { var numbers = new int[] { 1, 2, 2, 3, 3, 3, 4 }; Console.WriteLine(HashTableExercises.MostFrequent(numbers)); }