C # program to find the least non - overlapping number from a given set intervals
using System ; using System . Collections . Generic ; class GFG { class Pair : IComparable < Pair > { public int start , end ; public Pair ( int s , int e ) { start = s ; end = e ; } public int CompareTo ( Pair p ) { return this . start - p . start ; } }