What is an algorithm? Itās more than just a fancy word! We all experience algorithms in our daily lives because an algorithm is essentially aĀ set of defined steps. You could also think of it as instructions.
We come across instructions all the time:
Computers run on sets of instructions like these:
Good algorithms will:
āSolving a problemāĀ means that your algorithm does what it is supposed to do. If you are making a Burrito Making algorithm, it would be weird if it made cake. Nothing wrong with cake but that was, like, not the point.
āDoing it efficientlyāĀ means that the algorithm does not over-consumeĀ resources.Ā Think about ordering a burrito at Chipotle. Letās say that the person making the burrito kept breaking the tortilla because they were rolling it too tightly. Imagine if they went through five tortillas before making one good enough to hand you! While the person eventually got you your order, an unnecessary amount of tortillas were used up. A lot of time was also added to the process so both tortillas (anĀ inputĀ to the algorithm) and time were overspent. I bet the manager is none too pleasedā¦
Check out this video get learn a bit more about algorithms: