As a self-taught computer programmer, I’m often at a loss to estimate the O() value for a particular operation. Yeah, I know off the top of my head most of the important ones, like for the major sorts and searches, but I don’t know how to calculate one when something new comes along, unless it’s blindingly obvious. Is there a good web site or text that explains how to do that? Heck, I don’t even know what computer scientists call it, so I can’t google it.
Share
If you really want to learn this topic, then you probably need a standard theory/algorithms textbook. I don’t know of any website that can actually teach you complexity analysis (‘complexity’ or ‘time complexity’ is how you call those O() values; you might also want to google for ‘analysis of algorithms’ or ‘introduction to algorithms’ or such).
But before that — a free option. There are slides from a course given by Erik Demaine and Charles Leiserson in MIT, that are free and look great. I would definitely try to read them and see if that works for you. They are here.
Now, textbooks:
The classical choice for a textbook is Cormen et al’s book Introduction to Algorithms (there might be a cheap version available to buy here and I remember seeing a free (possibly illegal) version online, but I don’t remember where).
A more recent and modern-style book, which is IMO more fun to read and a better choice, is Kleinberg and Tardos’ Algorithm Design.
Here are some websites with information (I got these by googling ‘algorithm analysis lecture notes’ without the quotes):
The above is written by a computer science theorist. So programmers or other practical people might have some different opinions.