BST SortComputer Science Level pending
While playing with Binary Search Trees, you discover the following sorting algorithm. Given an unsorted array of \(n\) distinct numbers, you begin by iterating through it and insert each value to a Binary Search Tree. You then call the recursive procedure shown below on the tree.
1 2 3 4 5
It prints out the array in sorted order. What is the run-time of this sorting algorithm?