Are you confusing O(log n) with Theta(log n)?Originally Posted by e(ho0n3
For ii: Finding the 7th largest element is O(1). The array is sorted so there is no need for rearrangement. Removing the 7th largest element is also O(1), so all-in-all the worst case is O(1), which is included in O(log n), so ii is ok.



LinkBack URL
About LinkBacks







Reply With Quote


Bookmarks