N log n

educated guess