Next Greater Element — a decreasing stack, scanned backward
Walk nums2 from right to left. The stack holds candidates that are still "unbeaten"; pop any that the current value dwarfs, and whatever remains on top is the current value's next greater element.