LeetCode: Next Greater Element I
Problem:
https://leetcode.com/problems/next-greater-element-i/
Code:
class Solution:
def nextGreaterElement(self, nums1: List[int], nums2: List[int]) -> List[int]:
next_greater_mapping={}
stack=[]
result=[-1] * len(nums1)
...
is-power-of-two.hashnode.dev3 min read