What is an algorithm?
● A formula for extracting a solution from a problem using extremely basic stages is called an algorithm.
● This is crucial in all programming, not only when creating online applications.
● Any particular computer is built with a vast number of straightforward actions it can perform, but because it lacks the understanding of what occurs when they are, a programmer must specify what to do, where to do it, and when.
● The terms "algorithm" and "program" don't really differ in this sense, but generally speaking, an algorithm is a way of doing something without explicitly describing it for a particular computer, whereas implementing an algorithm entails starting with the operations provided in a programming language and formulating what the algorithm requires in terms of the operations you have.
● They are crucial because there are some approaches that are more effective than others when reducing a difficulty down into a series of straightforward steps.
● Let's utilise the well-known, straightforward problem of adding two numbers together.
● The schoolbook approach employs the straightforward requirement of "knowing sums of up to three digits" to add up greater numbers, digit by digit:
● Currently, the latter method is absurdly sluggish and only gets worse as the population increases.
● The solution that resolves the issue still just requires that you understand how to "increment and make mark" and "count marks.“
● These incredibly simple algorithms are my example because it ensures that you are already familiar with them.
● They have done so for a long time, and that may provide insight into how algorithms are developed.
● When a problem is presented to you, you begin by reading how it is written, and you quickly grasp the intended format of the solution.
● Then you attempt to outline what must occur in between in such dead-easy steps that even a perfect moron could accomplish it by rigidly adhering to your directives. It's almost the same thing to say that a computer could do it.
● In order to solve this problem, we followed some directions in a specified order. Our problem statement is to open a bottle of water. This particular collection of instructions is an algorithm for opening a water bottle.
Algorithm Types
● Linear Search
● Binary search
● Exponential search
● Toggle search
● Selection sort
● Bubble Sort
● Merge sort
● Insertion sort
● Quick sort counting sort
● Tree sort
● Almost all of these techniques enable you to locate items in large amounts of data and manipulate those objects for your desired display.
● FEO's characteristics as an algorithm (in spanish means ugly lol)
● There are three main categories in which a successful algorithm must fit; there may be others, but these three are unquestionably prerequisites.
Finite
● An algorithm must lead you somewhere; otherwise, what would be the point if it led you around in circles indefinitely? An algorithm's goal is to arrive at the solution.
● This may imply that an algorithm can run continuously, however For instance, the Google Search Engine will continuously provide results for you to use.
● While it is always producing output for enhancements, it is operating 24/7/365.