Next Element Greater than Subset
Find the next greater element for each value in the subset array.
We'll cover the following...
Statement
Given two integer arrays, nums1
and nums2
, where nums1
is a subset of nums2
, find the next greater element of some element x
in nums2
that is to the right of x
in the same array. If there is no next greater element, then the answer is .
Constraints
1
<=nums1.length
<=nums2.length
<=1000
0
<=
Access this course and 1400+ top-rated courses and projects.