"""
Exercise 2: Next Greater Element I (LeetCode 496)

nums1 is a subset of nums2 (distinct values). For each x in nums1 find the
next greater element to the right of x in nums2 (-1 if none). Precompute it
for all of nums2 with a monotonic stack and a dict.
"""

def next_greater_element(nums1, nums2):
    # TODO
    return [-1] * len(nums1)


# --- self-check: do not modify below this line ---
a = next_greater_element([4, 1, 2], [1, 3, 4, 2])
b = next_greater_element([2, 4], [1, 2, 3, 4])
print(a, b)
print("PASS" if a == [-1, 3, -1] and b == [3, -1] else "FAIL")
