{"id":3421,"date":"2025-10-05T00:00:00","date_gmt":"2025-10-04T22:00:00","guid":{"rendered":"https:\/\/tecnologia.euroinnova.com\/algoritmo\/"},"modified":"2025-10-07T14:58:14","modified_gmt":"2025-10-07T12:58:14","slug":"algorithm","status":"publish","type":"post","link":"https:\/\/tecnologia.euroinnova.com\/en\/algoritmo","title":{"rendered":"Algorithm"},"content":{"rendered":"<p><span style=\"background-color:transparent;color:#000000;\">The <strong>algorithm <\/strong>is one of the most basic concepts that needs to be understood in order to enter the world of <strong>programming and develop a programmer's mindset.<\/strong>.&nbsp;<\/span><\/p>\n<p dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">You may have heard about the<strong> algorithms<\/strong> in some conversations about technology or that you remember it from high school mathematics classes. It is very common to talk about <strong>the algorithms <\/strong>social networking sites like Tiktok or Instagram, which decide which posts to show you at any given time.<\/span><\/p>\n<h2 dir=\"ltr\" id=\"que-es-exactamente-un-algoritmo-en-informatica\"><span style=\"background-color:transparent;color:#000000;\">What exactly is an algorithm in computer science?<\/span><\/h2>\n<p dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">In a nutshell, <strong>an algorithm is nothing more than a series of steps that follow a certain order.<\/strong> and specific actions aimed at solving a problem or task.<\/span><\/p>\n<p dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">Although <strong>Algorithms apply only to mathematics, logic and programming, they can also be extrapolated to our daily lives.&nbsp;<\/strong><\/span><\/p>\n<p dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">After all, complex tasks such as preparing a plate of spaghetti, putting on a washing machine or cleaning a room also require following instructions that are made up of different steps. While they may vary from person to person, the skeleton remains very similar.<\/span><\/p>\n<p dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">And the fact is that <strong>the algorithms<\/strong> are just that: a set of instructions that, if completed, allow us to make decisions to carry out a particular task.<\/span><\/p>\n<h3 dir=\"ltr\" id=\"pasos-de-un-algoritmo\"><span style=\"background-color:transparent;color:#434343;\">Steps of an algorithm<\/span><\/h3>\n<p dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">Broadly speaking, a <strong>algorithm <\/strong>programming is governed by the following three steps:<\/span><\/p>\n<ul>\n<li dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">Input: The algorithm receives pre-existing information that it needs to operate.<\/span><\/li>\n<li dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">Processing: The system analyses the input and checks that it is correct. It then executes a series of commands to produce the desired result.<\/span><\/li>\n<li dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">Output: The algorithm provides a solution to the requested task and terminates.<\/span><\/li>\n<\/ul>\n<p dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">This output or result that the algorithm gives us can be correct or incorrect. And how does a programmer know that an algorithm is correct? By introducing various inputs and comparing its output with a confirmed solution that has been arrived at manually.<\/span><\/p>\n<p dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">However, it is often impossible to test the correctness of an algorithm based on manual mathematical operations because of the complexity and time involved. This is why we can often say that an algorithm is correct when the input is correct.<\/span><\/p>\n<p dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">Remember that an algorithm always executes the same commands systematically, and will only vary according to the information we provide it with.<\/span><\/p>\n<h2 dir=\"ltr\" id=\"ejemplo-de-algoritmo\"><span style=\"background-color:transparent;color:#000000;\">Example of an algorithm<\/span><\/h2>\n<p dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">To help you understand how an algorithm works, we illustrate it with a simple example based on the preparation of a tea.<\/span><\/p>\n<ul>\n<li dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">Step 1: Gather the necessary ingredients: Water, tea bag and sugar (optional).<\/span><\/li>\n<li dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">Step 2: Boil the water in a kettle.<\/span><\/li>\n<li dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">Step 3: Place the tea bag in a cup.<\/span><\/li>\n<li dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">Step 4: Pour the hot water into the cup.<\/span><\/li>\n<li dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">Step 5: Let the tea steep for a few minutes to infuse.<\/span><\/li>\n<li dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">Step 6: Remove the tea bag from the cup.<\/span><\/li>\n<\/ul>\n<p dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">At this point we must ask ourselves: do we want to add sugar to the tea, saccharin or nothing at all?<\/span><\/p>\n<ul>\n<li dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">Step 7 - A (sugar): Add sugar according to personal taste.<\/span><\/li>\n<li dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">Step 7 - B (saccharin): Add saccharin according to personal taste.<\/span><\/li>\n<li dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">Step 8: Stir the tea to mix in the sugar (if added).<\/span><\/li>\n<li dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">Step 9: Ready! Now you can enjoy a hot cup of tea.<\/span><br \/>&nbsp;<\/li>\n<\/ul>\n<p dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">Let's consider the input as the first step, as we gather the necessary elements to prepare the tea and introduce them into the process from the very beginning.<\/span><\/p>\n<p dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">The rest of the steps that we execute little by little to elaborate the tea would represent the whole process that an algorithm goes through to show the desired result.<\/span><\/p>\n<p dir=\"ltr\"><span style=\"background-color:transparent;color:#000000;\">By pouring the tea to drink, we would be getting an output and a subsequent termination of the algorithm.<\/span><\/p>","protected":false},"excerpt":{"rendered":"<p>El algoritmo es uno de los conceptos m\u00e1s b\u00e1sicos que es necesario comprender para adentrarse en el mundo de la [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[25],"tags":[],"class_list":["post-3421","post","type-post","status-publish","format-standard","hentry","category-metaterminos"],"acf":[],"_links":{"self":[{"href":"https:\/\/tecnologia.euroinnova.com\/en\/wp-json\/wp\/v2\/posts\/3421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tecnologia.euroinnova.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tecnologia.euroinnova.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tecnologia.euroinnova.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/tecnologia.euroinnova.com\/en\/wp-json\/wp\/v2\/comments?post=3421"}],"version-history":[{"count":0,"href":"https:\/\/tecnologia.euroinnova.com\/en\/wp-json\/wp\/v2\/posts\/3421\/revisions"}],"wp:attachment":[{"href":"https:\/\/tecnologia.euroinnova.com\/en\/wp-json\/wp\/v2\/media?parent=3421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tecnologia.euroinnova.com\/en\/wp-json\/wp\/v2\/categories?post=3421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tecnologia.euroinnova.com\/en\/wp-json\/wp\/v2\/tags?post=3421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}