What is an algorithm? The chapter in the book began almost with the words:

performance measurement algorithms by Big O Notation

But they did not tell what algorithm is.

Closed due to the fact that it is necessary to reformulate the question so that it was possible to give an objectively correct answer by the participants Harry , aleksandr barakin , Denis , user194374, Denis Bubnov 27 Nov '16 at 17:41 .

The question gives rise to endless debates and discussions based not on knowledge, but on opinions. To get an answer, rephrase your question so that it can be given an unambiguously correct answer, or delete the question altogether. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • 2
    Well, google: // define + algorithm gave me the “Process or set of rules necessary to carry out the calculation or perform any task.” - VladD

3 answers 3

We encounter algorithms almost every day. Sometimes even without realizing it. For example, when asking someone to buy groceries in a store. We explain what products are needed, how many of them, and what requirements we place on them. For example: buy two loaves of black bread, and fresh one.

We specify a clear algorithm: you need to go to the store, find out if there is black bread. Then find out if this bread is fresh. And after that (in the case of two positive answers) buy two loaves.

Even a brief description of this routine for each of us is a rather voluminous procedure. What then to talk about user instructions, which are examples of more complex algorithms?

I recommend - once the concept itself causes misunderstanding - start with this lesson . I am not joking and not making fun.

And, by the way, here is a list of books that, perhaps, it makes sense to look at - Books on the topic "Algorithms"

    Vicky gives such a definition

    Algorithm - a set of instructions describing the procedure for the performer to achieve some result. In the old interpretation, instead of the word “order,” the word “sequence” was used, but as parallelism developed in computers, the word “sequence” was replaced with the more general word “order”. Independent instructions can be executed in any order, in parallel, if used by the performers allow.

    • there seems to have forgotten the key one - Algoritm - a set of instructions, uniquely understandable to the performer , describing ... - KoVadim
    • Those. Is an effective access algorithm or sorting algorithm an effective sequence of actions to achieve the best result? - Anton Sorokin
    • What and where are they used at all? Often they were met in articles. - Anton Sorokin
    • effective - it means it works quite well and quickly. And most likely at the moment did not find the faster. - KoVadim
    • 2
      @ antonsorokin not "the best result." No matter how you sort, you always get the same sorted sequence. An efficient algorithm is an algorithm that consumes the least amount of resources to achieve a goal. And resources can be different. Most often - this is the execution time. But there are others: use of memory, access to the disk, access to the network ... - Anton Shchyrov

    The efficiency of algorithms is measured by its "complexity". The complexity can be temporary, by memory, by program size, computational, etc. For convenience, use the O notation

    I advise you to look at the Yandex Algorithms course. There the first lecture is just about that.

    PS off topic, but " E effective"