LeetCode Solutions

Stack

Monotonic structures and deferred answers for next-greater and range-style problems. The focus here is monotonic stack reasoning. Official LeetCode problems are linked on every page instead of being mirrored here.

1 published solutions
3 distinct tags
0 easy / 1 medium / 0 hard difficulty mix
May 21, 2026 most recently updated page

Published pages in this category

Every page keeps the problem summary, recognition pattern, reasoning, pitfalls, and the exact C++ source used on the site.

Stack #01

Daily Temperatures

Medium

For each day, compute how far away the next warmer temperature appears.

Solved stackmonotonic stacknext greater element