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

BST incorrect time complexity #118

Open
Rohithyeravothula opened this issue Feb 20, 2019 · 1 comment
Open

BST incorrect time complexity #118

Rohithyeravothula opened this issue Feb 20, 2019 · 1 comment

Comments

@Rohithyeravothula
Copy link

Insertion, deletion, access and search time complexities of BST are incorrect, they must be O(h) where h = height of the BST, and not O(log(n)). In cases, where BST is a balanced BST, h will be log(n) and the time complexities will be O(log(n)), else h can be n (no of nodes) in worst case so the time complexities will be O(n).

@bessex
Copy link

bessex commented Jul 2, 2019

Your assumption is that the listed time complexities should be worst case though, right? Is this project intended to provide average or worst case time complexity?

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

No branches or pull requests

2 participants