<s> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> class Interval ( object ) : <EOL> def __init__ ( self , start , end ) : <EOL> self . start = start <EOL> self . end = end <EOL> class Solution : <EOL> @ staticmethod <EOL> def cmp ( a , b ) : <EOL> """<STR_LIT>""" <EOL> if a . start != b . start : <EOL> return a . start - b . start <EOL> else : <EOL> return a . end - b . end <EOL> def countOfAirplanes ( self , airplanes ) : <EOL> """<STR_LIT>""" <EOL> return self . count_heap ( airplanes ) <EOL> def count_heap ( self , intervals ) : <EOL> """<STR_LIT>""" <EOL> import heapq <EOL> intervals . sort ( cmp = Solution . cmp ) <EOL> heap = [ ] <EOL> cnt = <NUM_LIT:0> <EOL> for intv in intervals : <EOL> heapq . heappush ( heap , intv . end ) <EOL> while heap [ <NUM_LIT:0> ] <= intv . start : <EOL> heapq . heappop ( heap ) <EOL> cnt = max ( cnt , len ( heap ) ) <EOL> return cnt <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> assert Solution ( ) . countOfAirplanes ( [ Interval ( i [ <NUM_LIT:0> ] , i [ <NUM_LIT:1> ] ) for i in [ [ <NUM_LIT:1> , <NUM_LIT:10> ] , [ <NUM_LIT:2> , <NUM_LIT:3> ] , [ <NUM_LIT:5> , <NUM_LIT:8> ] , [ <NUM_LIT:4> , <NUM_LIT:7> ] ] ] ) == <NUM_LIT:3> </s>
