stack problem
Problem
LinkCategory / PatternKey idea / TemplateDifficultyNotes
Next Greater Element (Right)https://leetcode.com/problems/next-greater-element-i/Monotonic stack — next greaterMaintain decreasing stack; pop while current > stack.top. O(n).Easy...
yesamitsingh.hashnode.dev2 min read