Skip to content
StackDecode
Dynamic programmingExplained

Interval DP

Solve every sub-interval, then combine them into larger ones.

Time

O(n³)

Extra space

O(n²)

Use it for

Matrix chain, burst balloons.

An animated walkthrough for this algorithm isn’t built yet. The summary above explains the idea; see the related animated algorithms below to practise the same technique.