Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 1.14 KB

File metadata and controls

49 lines (35 loc) · 1.14 KB

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