Structure to hold details of each interval
public class interval { public int l , r , v ; } public class sortHelper : IComparer < interval > { public int Compare ( interval a , interval b ) { return ( a . v < b . v ? 1 : 0 ) ; } } static int = 100001 ;