Getting Started#
dpvis is designed to assist students studying algorithm design gain a more thorough understanding of the counter-intuitive yet beautiful technique in theoretical computer science known as Dynamic Programming (DP).
Our library turns "standard" Python code into an interactive visualization. For example, consider a dynamic program that computes the \(n\)th Fibonnaci number. With only three lines of changes, you can convert the standard python implementation to leverage the functionalities of dpvis.
1 2 3 4 5 6 7 8 9 10 11 |
|
- Replaces the standard Python list with a
DPArray
object. - Shows the visualization with
display(arr)
.
1 2 3 4 5 6 7 |
|
dpvis supports additional features that enhances the visualization. For a more comprehensive overview, see our tutorials.