O subtle slope, O measured climb,
You walk the edge 'tween brute and prime.
You split the work, you halve the load,
You carve a clean, efficient road.
In search and sort, your grace appears,
A ghost in heaps, in balanced spheres.
The novice loops with loops again,
But you? You laugh: "Just log of n."
The b-tree hums, the trie aligns,
The segment tree recalls your signs.
In index scans and page faults missed,
You move unseen, but still persist.
Oh logarithm, cool and sly,
You never crawl, you rarely fly.
But when the stakes are coded tight,
You shine with calm, logarithmic light.
Postscript:
In every contest, trick, or test–
If time is tight, log n is best.