@@ -0,0 +1,512 @@
+from collections import defaultdict%0Aclass Solution(object):%0A    def nextGreaterElement(self, findNums, nums):%0A        %22%22%22%0A        :type findNums: List%5Bint%5D%0A        :type nums: List%5Bint%5D%0A        :rtype: List%5Bint%5D%0A        %22%22%22%0A        next_greater = defaultdict(lambda: -1)%0A        stack = %5B%5D%0A        for n in nums:%0A            while stack and stack%5B-1%5D %3C n:%0A                next_greater%5Bstack%5B-1%5D%5D = n%0A                stack.pop()%0A            stack.append(n)%0A        return map(next_greater.__getitem__, findNums)%0A%0A

Add py solution for 496. Next Greater Element I