This visualisation uses AI Generated code, finetuned for the best visualisation, not code quality
kadanes.mov
Interactive Raylib visualizer for Kadane's algorithm, showing how the running subarray sum, best-so-far segment, and reset decisions evolve as the scan moves across the array.
- Why a negative running sum should be dropped
- How the current subarray and best subarray differ
- How local decisions produce the global maximum subarray
- A panel layout that keeps scan position, running sum, and winner segment visible together
flowchart LR
A["Input Array"]
B["Extend Current Sum"]
C["Compare With Restart"]
D["Keep Better Current Subarray"]
E["Update Best-So-Far"]
A --> B
B --> C
C --> D
D --> E
q: quit- Scene-specific stepping controls are shown in the active UI
make run