@@ -0,0 +1,888 @@
+%22%22%22Leetcode 1. Two Sum%0A%0AURL: https://leetcode.com/problems/two-sum/description/%0A%0AGiven an array of integers, return indices of the two numbers such that %0Athey add up to a specific target.%0A%0AYou may assume that each input would have exactly one solution, %0Aand you may not use the same element twice.%0A%0AExample:%0AGiven nums = %5B2, 7, 11, 15%5D, target = 9,%0A%0ABecause nums%5B0%5D + nums%5B1%5D = 2 + 7 = 9,%0Areturn %5B0, 1%5D.%0A%22%22%22%0A%0Aclass Solution(object):%0A    def twoSum(self, nums, target):%0A        %22%22%22%0A        :type nums: List%5Bint%5D%0A        :type target: int%0A        :rtype: List%5Bint%5D%0A        %22%22%22%0A        lookup_dict = %7B%7D%0A        for i, num in enumerate(nums):%0A            if target - num in lookup_dict:%0A                return %5Blookup_dict%5Btarget - num%5D, i%5D%0A            lookup_dict%5Bnum%5D = i%0A        return %5B%5D%0A%0A%0Adef main():%0A    print Solution().twoSum(%5B2, 7, 11, 15%5D, 9)%0A%0Aif __name__ == '__main__':%0A    main()%0A

Add lc001: two sum