why do tree always takes o(log n) time?

Answer Posted / hanuman

Not all tree takes O(logn) time. but only BST takes O(logn) time just because it search,insert, delete node using mid element that means complexity of that tree is O(logn).

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the method to find the complexity of an algorithm?

533


How do you rotate an AVL tree?

557


What are vectors used for in real life?

466


What is a stable algorithm?

467


What is a list in data structure?

450






How do you do a heap sort?

466


Explain implementation of traversal of a binary tree.

574


Are linked lists considered linear or non-linear data structure?

606


Which sorting technique is best?

515


Which is faster binary or linear search?

478


Define probing?

698


Which collection is used for sort?

494


What does map stand for?

466


What will you prefer for traversing through a list of elements between singly and doubly linked lists?

559


What is complexity algorithm?

449