How to write code My coding summary ^_^ Write bad code quickly, then do improvement. Wait 2 days to look up answer. Wanna be O(n), just waste some memory and design data structure carefully. Try sort first, then do what you want. (Two Sum, Three Sum)