as i read some material about Optimal BST, i ran into a trouble.
for following key i find two optimal BST with Average Cost = 30. 1 optimal BST using Dynamic programming Algorithm and 1 by hand !
key : 1/ 2/ 3 /4/ 5
frequencies: 10 / 8/ 6/ 4/ 2
i think always the Optimal BST using dynamic programming always has a unique solution. am i wrong ? or may be we have 2 or more optimal BST and all is correct.