Write program to implement Dynamic Programming algorithm for the Optimal Binary Search Tree Problem.