What are the complexities of the insert, remove and…

0

What are the complexities of the insert, remove and search methods of a binary search tree in the worst case?
(A) insert is O(n), remove is O(n), search is O(n)
(B) insert is O(log n), remove is O(log n), search is O(n)
(C) insert is O(log n), remove is O(log n), search is O(log n)
(D) insert is O(log n), remove is O(log n), search is O(1)
(E) These methods can’t be defined on a binary search tree

Ravi Garg edited question
    0
    Anupriya Anu (anonymous)

    Is it (C)??

    Anupriya Anu answered
      0
      Sonali Kapoor (anonymous)

      Correct Answer is A.
      @anupriya .. C is average case and not worst case….check it on wikipedia…

      Sonali Kapoor answered
        Add image to editor add image from link

        Question stats

        • Active
        • Views181 times
        • Answers2 answers
        • Followers1 follower
        Question and answer is powered by AnsPress