Skip to content
jamylakPublic

About

Monotonic Stack Visualiser

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monotonic Stack Visual Debugger

This visualisation uses AI Generated code, finetuned for the best visualisation, not code quality

monotonic_stack.mov

Interactive Raylib debugger for a monotonic-stack solution to Daily Temperatures, with source-linked stepping, state inspection, and direct comparison against the brute-force intuition.

What This Visualisation Shows

  • How the stack stores unresolved indices in monotonic order
  • How warmer temperatures trigger a cascade of pops and answer writes
  • Why the stack solution avoids the repeated rescans of brute force
  • A debugger-style layout that links state changes to highlighted source lines

Visual Map

flowchart LR
    A["Temperature Array"]
    B["Push Unresolved Days"]
    C["See Warmer Day"]
    D["Pop Colder Indices"]
    E["Write Waiting Distances"]
    F["Continue Scan"]

    A --> B
    B --> C
    C --> D
    D --> E
    E --> F
Loading

Controls

  • q: quit
  • space: play or pause
  • n: single-step
  • r: reset
  • g: toggle goal dialog
  • h: toggle help

Run

make run

About

Monotonic Stack Visualiser

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages