Skip to content

jamylak/dynamicprogramming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DP Visual Lab

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

dynamicprogramming.mov

Interactive C + Raylib lab for dynamic programming, with separate scenes for 0/1 Knapsack, LIS, and grid-path counting plus linked code and state views.

What This Visualisation Shows

  • How DP tables or state arrays are filled one dependency at a time
  • How different problem types still share the same reuse-of-subproblems pattern
  • How code, cell state, and recurrence structure line up during execution
  • Scene-specific dialogs for goals, controls, and cell inspection

Visual Map

flowchart LR
    A["Problem State"]
    B["Recurrence Choice"]
    C["Reuse Smaller Subproblems"]
    D["Write DP Cell / State"]
    E["Advance Frontier"]
    F["Final Answer"]

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

Controls

  • q: quit
  • 1 / 2 / 3: switch scenes
  • space: play or pause
  • n or right: single step
  • r: reset
  • h, g, c / f1, and esc: manage help and goal dialogs

Run

make run

About

Dynamic Programming Visualiser

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors