Next Greater Element to the Right

Asked at Google · Coding & Leetcode-style Questions · Difficulty: Medium

For each element of an array, find the first element to its right that is strictly larger, or report that none exists.

Loading the problem…