Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimal BST #17

Open
UseTheApi opened this issue Mar 9, 2017 · 1 comment
Open

Optimal BST #17

UseTheApi opened this issue Mar 9, 2017 · 1 comment
Assignees

Comments

@UseTheApi
Copy link
Owner

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
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant