Generalize The Optimal Binary Search Tree Algorithm

Generalize The Optimal Binary Search Tree Algorithm