Python icon indicating copy to clipboard operation
Python copied to clipboard

Optimize and Test Optimal Binary Search Tree Implementation for optimal_binary_search_tree.py

Open SamyakMishra072 opened this issue 1 year ago • 3 comments

The current implementation of the optimal binary search tree algorithm works well, but there are a few areas for improvement and further testing.

SamyakMishra072 avatar Oct 03 '24 22:10 SamyakMishra072

Could you elaborate on how the implementation could be improved?

tianyizheng02 avatar Oct 04 '24 09:10 tianyizheng02

Hi team!,

I’m interested in contributing to this issue. I believe I can help with it. Could you please assign it to me? Looking forward to collaborating!

Thank you!

ghost avatar Oct 04 '24 09:10 ghost

Knuth’s optimization has been used for optimal_binary_search_tree.py here function has been ,applied with hardcoded intervals using root[i][j - 1] and root[i + 1][j]. and this is reducing the range of r, more extensive testing should be done to ensure correctness when the intervals are small or boundaries overlap. I want to fix this so that it works correctly, especially when the intervals are small or the boundaries overlap.

SamyakMishra072 avatar Oct 04 '24 19:10 SamyakMishra072