How to identify the maximum number of overlapping date ranges?
This question might be similar to: Determine Whether Two Date Ranges Overlap Multiple Date range comparison for overlap: how to do it efficiently? But, how can I get the maximum number of overlapping date ranges? (preferably in C#) Example: (from - to) 01/01/2012 - 10/01/2012 03/01/2012 - 08/01/2012 09/01/2012 - 15/01/2012 11/01/2012 - 20/01/2012 12/01/2012 - 14/01/2012 Result = 3 maximum overlapping date ranges Solution : Possible implementation of the solution proposed by @AakashM List<Tuple<DateTime, int>> myTupleList = new List<Tuple<DateTime, int>>(); foreach (DataRow row in objDS.Tables