For nums1 = [4,1,2] and nums2 = [1,3,4,2], what is the answer?
Practice this question from Next Greater Element I - Monotonic stack Pattern Practice Quiz, with options and an explanation.
Question
For nums1 = [4,1,2] and nums2 = [1,3,4,2], what is the answer?
Option A — Correct answer
[-1, 3, -1]
Option B
[3, 4, -1]
Option C
[4, 1, 2]
Option D
[0, 1, 2]
Explanation
The answer is [-1, 3, -1].