Skip to content

Advanced Data Structure

Dynamic Programming

Solve sub-problems just once and save answers in a table Use a table instead of recursion

example 1 Fibonacci Number

alt text

example 2 Ordering Matrix Multiplications

alt text alt text

example 3 Optimal Binary Search Tree

alt text alt text

example 4 All-Pairs Shortest Path

alt text alt text