Next Greater Element II — Interactive Visualizer

Simulate a circular array by scanning twice while the monotonic stack keeps candidate greater values.