<s> """<STR_LIT>""" <EOL> from collections import defaultdict <EOL> __author__ = '<STR_LIT>' <EOL> class TwoSum ( object ) : <EOL> def __init__ ( self ) : <EOL> """<STR_LIT>""" <EOL> self . hash_map = defaultdict ( int ) <EOL> def add ( self , number ) : <EOL> """<STR_LIT>""" <EOL> self . hash_map [ number ] += <NUM_LIT:1> <EOL> def find ( self , value ) : <EOL> """<STR_LIT>""" <EOL> return any ( <EOL> value - k in self . hash_map and ( value - k != k or self . hash_map [ k ] > <NUM_LIT:1> ) <EOL> for k in self . hash_map <EOL> ) <EOL> def find_TLE ( self , value ) : <EOL> """<STR_LIT>""" <EOL> for k in self . hash_map . keys ( ) : <EOL> target = value - k <EOL> if target in self . hash_map and ( target != k or self . hash_map [ target ] > <NUM_LIT:1> ) : <EOL> return True <EOL> return False </s>
