Made contruct_optimal_bst a more elegant, recursive function.