<s> __author__ = "<STR_LIT>" <EOL> '''<STR_LIT>''' <EOL> from collections import defaultdict <EOL> def non_overlapping ( array ) : <EOL> '''<STR_LIT>''' <EOL> total = [ ] <EOL> for i , t in enumerate ( array ) : <EOL> start = t [ <NUM_LIT:0> ] <EOL> end = t [ <NUM_LIT:1> ] <EOL> for tt in array [ i + <NUM_LIT:1> : ] : <EOL> if end <= tt [ <NUM_LIT:0> ] : <EOL> total . append ( [ ( start , end ) , ( tt [ <NUM_LIT:0> ] , tt [ <NUM_LIT:1> ] ) ] ) <EOL> return total <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> import doctest <EOL> doctest . testmod ( ) </s>
