using System.Collections.Generic;
public static IEnumerable<int> Intersection(IEnumerable<int> sortedA, IEnumerable<int> sortedB)
return new [] { 1, 2, 3 };
public static void Main()
var result = Intersection(new [] { 3, 5, 7, 9}, new [] { 2, 5, 6, 9, 12});
Console.WriteLine(string.Join(", ", result));