BY TYLER LACOMA
What is an algorithm, and how does it work? These processes are all around us. Let’s take a closer look at them

Source: Google Support for Developers
The word “algorithm” is ubiquitous these days. However, like many tech terms that get thrown around, its meaning isn’t always clear to casual audiences. Since it seems like algorithms are everywhere and doing everything, many people have grown confused about what this software does. Are you using algorithms every time you pull out your Android phone? Almost certainly.
So, what do these algorithms do? A quick tech lesson will make everything clear. Here’s what algorithms do behind the scenes and why they’re important.
Okay, what’s an algorithm?
A computer algorithm is a set of instructions that tell computers how to handle and interpret data. Still, that’s vague. Algorithm instructions can range from simple algorithms, like automatically sorting sets of numbers into larger and smaller categories, to complex algorithms, like the Google search engine algorithm that analyzes data about websites and ranks them in the search order. No matter how complex, the algorithm still does the same thing. It takes a set of data and follows a careful process to turn that data into useful results for human users.
The instructions for the algorithm are written in code and typically include significant amounts of math, if/then formulas, and other tools that make a bunch of information make sense. That’s why creating an algorithm can take a lot of work and involves many parts.
What are the characteristics of an algorithm?
Source: GFC Global
An algorithm uses math and coding to solve problems and turn data into usable information. But let’s dig a little deeper. One model for algorithms suggests that they should have five core characteristics to meet the definition:
Definition/Definiteness: An algorithm must be a clearly described process, with each step in its instructions laying out precisely what it does to reach the endpoint.
Inputs: An algorithm takes data from somewhere, so it gets inputs. That data needs to be labeled or defined so that the algorithm can understand it and categorize it.
Outputs: The algorithm provides an output or the result of its calculations. The output value is the purpose of the algorithm, the information that can be used to make decisions (both automated and non-automated decisions).
Finiteness: An algorithm must be created to have a stopping point. This is the point where it stops working until it’s started again. If a process constantly works in an endless loop, it isn’t technically an algorithm, although it may do similar things.
Effectiveness: An algorithm should work in the practical world. Algorithms aren’t only mathematical theories. They are tools that produce real results when put into practice.
Are there some handy examples of algorithms?
Sure, let’s take a look at a couple.
A binary search: This is one of the first examples of an algorithm that’s taught because it’s a basic design. An algorithm is instructed to take a set of values (for example, numbers) and find a specific value (such as the number 7). The algorithm uses its built-in rules to organize the set of numbers from highest to lowest. Then, it finds the middle value and checks if it’s higher or lower than the value it wants to find (in this example, that’s 7). If it’s lower, the algorithm discards the lower half of the data set, finds the new midpoint of the higher set, and tries again. After a few divisions like this, the algorithm locates the target value and where it is in the set. It returns this information and a search result.
YouTube’s recommendation algorithm: Now for a more complex example. YouTube’s recommendation algorithm gathers data on which videos users watch and how those videos are tagged or explained. It also looks at the number of views, the clicks a video gets, the number of likes and comments, how long people watch videos, and how videos are shared. This helps the algorithm locate popular videos that are similar to the video a user watched and seem to have a similar audience based on user habits. Then, these suggested videos are automatically listed as recommendations while people are watching.
When suggestions or searches are used in an app, there’s an algorithm behind it. That’s true of Facebook posts, Spotify radio, and GPS maps.
The more complex algorithms online dictate the ads and content that people see on many platforms, which puts them in charge of a tremendous amount of revenue. It’s no surprise, then, that companies like Google keep the details of their algorithms a close secret. However, through testing, there’s a lot we can infer about how these algorithms work.
This also means that big, complex algorithms are constantly updated. Developers change what the algorithms decide is important, how much weight they give certain factors, and what new factors should be considered. YouTube’s algorithm, for example, didn’t originally account for the watch time for videos or flag inappropriate content. Now it does. Theoretically, this makes algorithms more accurate. In practice, that doesn’t always pan out.
Where does the name algorithm come from?
It’s an old mathematical term that originally described a decimal number system. It’s believed to have originated from a 9th-century Persian mathematician known as Abu Abudullah Muhammad ibn Mūsā al’Khwārizmī. The last part of his name, after several translations, began to look a lot like “algorithm” and was used as a shorthand by mathematicians to describe more complex processes. Al’Khwārizmī was also responsible for a little thing we know as algebra.
Do algorithms have any problems or downsides?
Source: Pexels
Yes, they do. They can pose inherent challenges, not only to developers debugging them but to society in general. Here are a few of the biggest concerns:
Information pipelines: Algorithms struggle to understand if the content is ethical, appropriate, or accurate. They usually recommend things based on what other users are doing. If many users on a platform are targeted by misinformation or acting inappropriately, the algorithm amplifies those problems. Unsuspecting users can be steered toward recommendations that aren’t always healthy or honest. That’s how we get things like dangerous TikTok trends and social media propaganda. Including flag protocols in algorithms filters some content out, but they’ve been slow to catch up.
Inherent biases: Algorithms are designed by humans. Sometimes, humans don’t do a good job of setting parameters. Not intentionally, but because of inherent biases, lack of awareness, and poor quality control. The most infamous example was when Google’s image detection algorithm labeled Black people as gorillas, a problem so inherent in the algorithm’s creation that Google’s only long-term solution was to stop looking at gorillas altogether.
Legal and privacy ramifications: Should an algorithm decide the likelihood that you’ll commit a crime in your life? Should it tell companies what you’re most likely to buy next? Should it determine where you get to vote? Would an algorithm make “fair” decisions compared to humans doing the same? People are concerned about these questions, and the answers aren’t always clear. But the more important decisions algorithms make, the higher the risk they could seriously interfere with people’s lives.
Is AI a type of algorithm?
The simplest answer is yes. AI technology is a type of algorithm. Machine learning, large language models like those used in ChatGPT, and other AI software use layers of algorithms within algorithms to work. They’re designed to define a lot of data themselves when possible and self-correct as they categorize more and more information.
At some point, AI is complex enough that people start asking if it really counts as an algorithm anymore and perhaps deserves a separate classification. For now, think of algorithms as the building blocks for the towering structures we know as AI.
Now you’re ready with algorithm facts!
Consider your intro to algorithms complete. Now you have some insight into the processes that sort through data and produce results like song recommendations, similar videos, search results from your contact list, and everything in between. If you want to keep algorithms from interfering with your privacy, we suggest stopping by our guide on digital privacy for Android.
ABOUT THE AUTHOR
Tyler Lacoma • Writer/Editor(49 Articles Published)
Tyler Lacoma has spent more than 10 years testing tech and studying the latest web tool to help keep readers current. He’s here for you when you need a how-to guide, explainer, review, or list of the best solutions for your Android life.