ONLogN Linearithmic Time

1 min read
Rapid overview

O(n log n) - Linearithmic Time

Sorting and divide-and-conquer algorithms.

const sorted = [...items].sort((a, b) => a - b);

Notes

  • Most comparison-based sorting is O(n log n).
  • Sorting dominates when combined with O(log n) lookups.