algorithms icon indicating copy to clipboard operation
algorithms copied to clipboard

Optimal BST

Open UseTheApi opened this issue 8 years ago • 1 comments

Finding optimal BST which keys are assigned weights (searching priorities), which cost of weights + depths(i) is minimum. Greedy solution is to pick the biggest weight node and place it in the root of the tree, but if both key and weight are max then resulting BST is unbalanced and not optimal

UseTheApi avatar Mar 09 '17 20:03 UseTheApi

main has to work with inputs. + function must be tested better.

UseTheApi avatar Mar 09 '17 21:03 UseTheApi