Comparison function for sorting
class sortHelper : IComparer { int IComparer . Compare ( object a , object b ) { Interval first = ( Interval ) a ; Interval second = ( Interval ) b ; return first . s - second . s ; } }