Updated run time analysis on the algorithm

It's N log N, not log N because there's one traversal of the array plus log N to insert the elements in to the binary tree.