A Programmer's Companion to Algorithm Analysis