logoalt Hacker News

bajard • today at 9:49 AM • 1 reply • view on HN

You are moving n/2 objects log(n) times, so its O(n.log(n))


Replies

wky • today at 3:03 PM

Only half of the remaining boxes need to be moved, not half of the total.