mad tight
i wrote some mad tight code the other day. i really wanted some stroking but no one would tell me how cool i am. the old algorithm was o(n^2). the new one is o(n log n). big difference when n is on the order of a million. the task involved doing many different things. so making everything o(n log n) and keeping everything in a reasonable amount of memory was tricky. i ended up with a binary tree with two linked lists laced through each node. mad tight.