Community
A stack can answer next-greater queries in one scan — CareerVerse