static void Main(string[] args) { var ranges = new List <Range <string> > { new StringRange("W", 5, 8), new StringRange("S", 1, 4), new StringRange("L", 2, 6), new StringRange("X", 9, 20), new StringRange("T", 21, 30) }; var finder = new OverlappingRangeFinder(); c4(ranges); var results = finder.FindOverlaps(ranges).ToList(); foreach (var result in results) { Console.WriteLine("{0} overlaps with: {1}", result.Range, string.Join(", ", result.OverlappingRanges.Select(r => r))); } }
static void c4(IEnumerable <IRange> ranges) { var finder = new OverlappingRangeFinder(); var results = finder.FindOverlaps(ranges); }