in Algorithms
536 views
1 vote
1 vote
Balanced Binary Tree vs Complete Tree

Insertion and Deletion is faster in which of the above 2 structures?
in Algorithms
by
536 views

4 Comments

edited by

Assuming pointer to node which need to be deleted given

Balanced Binary Tree insertion = O(logn), deletion= O(logn)

Complete Tree insertion = O(1), deletion= O(1)

Assuming pointer to node which need to be deleted  not given

Balanced Binary Tree insertion = O(logn), deletion= O(n)

Complete Tree insertion = O(1), deletion= O(n)

1
1

Assuming pointer to node which need to be deleted  not given

Balanced Binary Tree insertion = O(logn), deletion= O(n)

Complete Tree insertion = O(1), deletion= O(n)

I think you meant this ?

0
0
now check i wrote wrong.
0
0
0
0

Please log in or register to answer this question.

Related questions