O(n log n)

Jul. 19th, 2020 11:59 am
bnewman: (Default)
[personal profile] bnewman posting in [community profile] bn_songbook
Big O notation is used to describe how efficiently algorithms scale as the input grows.  O(n log n), pronouced "big O of n log n", is one class that contains the most common sorting algorithms.

lyrics by Benjamin Newman
ttto: "Blowin' in the Wind" by Bob Dylan
 
 
/: D G D (Bm) / (D) G A - :/
 
How many times must two strings be compared
To sort alphabetically?
And how long does it take to empty a heap
Or fill up a binary tree?
If you store every bit string between 1 and n
How many bits will that be?
 
/ G A D Bm / G A D - /
 
The answer, my friends, is O(n log n)
The answer's O(n log n)

Profile

bn_songbook: (Default)
Ben's Songs

December 2025

S M T W T F S
 123456
78910111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 22nd, 2026 05:45 pm
Powered by Dreamwidth Studios