An algorithm

algorithms

What exactly is an algorithm, as in what does Algorithm mean? The little I understand the word, is that it's not specific to a particular language, or design pattern, rather it's one the most basic principles (so I guess this question makes me look stupid).

One of the "options" I have of understanding it, is that it means the method of getting something done, that could be written as a list in pseudocode.

When I write more complicated code, I think what needs to be done, with what, and how I would get there (not in a programming language), then write that in code. Is that good way to go about it, and is that anything to do with algorithms?

(I wanted to ask here rather on Stackoverflow, because it's not about a specific problem/language plus I get the feeling that the majority of people here know the 'why', or at least the answers here are more detailed, rather than on Stackoverflow where it's different, I'm sorry if I should have asked over there)

Best Answer

An algorithm is a finite sequence of well-defined instructions for calculating a function (or executing a procedure) that terminates in a well-defined ending state.

Related Topic