What is the running time of inserting elements in tree


Problem: You are given a set of a real numbers which you are asked to insert incrementally in an initially empty binary search tree. Note that the time to insert an element in a binary search tree of size x is O(log x). What is the total running time of inserting all the elements in the tree. Justify your answer. Assume that you have formed the binary search tree on a elements, show how you can report the elements in a sorted order in O(n) time.

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: What is the running time of inserting elements in tree
Reference No:- TGS03252114

Expected delivery within 24 Hours