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

March 2025

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 17th, 2025 04:02 am
Powered by Dreamwidth Studios