Skip to content
#

monotonic-stack

Here are 21 public repositories matching this topic...

Worked LeetCode problems in C++, kept as a study log rather than a submission archive. One standalone program per problem, each opening with the reasoning the code cannot show: the invariant it maintains, why a prune is sound, what it costs in time and space.

  • Updated Aug 24, 2026
  • C++

Competitive programming problem designed to expose failure modes in frontier LLMs. Features a 3-layer trap invalidating greedy, O(N²) DP, and prefix-sum optimizations. Correct O(N log V) solution via monotonic stack + DP. Built for Turing's Python TopCoder Problemsetter Assessment.

  • Updated Jun 8, 2026
  • Python

A slim and efficient in-memory Deque (doubly-ended queue) for Node.js projects, designed with Data-Oriented Design principles and implemented using a cyclic buffer to optimize memory layout through sequential item allocation. A notable real-world use case is maintaining the minimum or maximum item in a data stream.

  • Updated Nov 19, 2024
  • TypeScript

Add this topic to your repo

To associate your repository with the monotonic-stack topic, visit your repo's landing page and select "manage topics."

Learn more