Optimal BST Cost
Let CLeft,Right be the cost of the optimal subtree between wLeft and wRight. Then, CLeft,Right is:
Let’s maintain a 2-D table to store values of Ci,j
Previous slide
Next slide
Back to first slide
View graphic version