Implemented Optimal Binary Search Tree Algorithm