Going Back To Basics: Understanding Algorithms

Kristen Cadacio
3 min readJun 26, 2022

--

Photo by Michael Dziedzic on Unsplash

Since finishing my coding Bootcamp, I wanted to hit the ground running and create new projects, search for jobs, create my portfolio, write more Medium posts, and fix up old projects. As if I didn’t have a lot on my hands I’ve also been trying to solve algorithms, which are very important when you are job searching and are essential to the interview process.

But if you are a person who has always feared words such as “algorithms”, “data structures”, and “Big O” and if you are a person where concepts take a while for it to sink in (like myself!) — then you probably avoided learning about it.

So to get myself comfortable — here is my basic understanding and explanation of algorithms. In my next article, I hope to tackle data structures and Big O. But for now, we have to start with the fundamentals.

Algorithm
In its most basic definition, an algorithm is a sequence of instructions in order to solve a problem. Other ways to think of algorithms are:

  • A specific set of instructions in order to solve a problem or achieve a task
  • Clear specifications for processing data and for doing calculations, among many other tasks
  • A process for determining a solution to the problem
  • Another way to think of algorithms is by thinking of them as games. Whoever creates that specific algorithm is setting the game’s rules. The main objective is to win, save the princess, etc.

Everyday Cases
A great way to understand this concept is to think of real-world scenarios. Here are some real-world examples:

  • A recipe — Here, we have to follow a set of directions in order to cook a certain dish. Below are the instructions for pancakes:
Example of a algorithm — a recipe for pancakes
  • Find your way to Times Square — This is an example that was given at my Bootcamp in NYC. We were asked how do we get to Times Square from class. As you can imagine there were multiple ways people answered. Some were detailed, some answers required taking the subway or instructions for walking.
  • Sorting papers — When you are sorting office files or your personal documents you are following a set of tasks to achieve an outcome. You can sort your files alphabetically, by word count, by date, and in countless other ways. The goal is to simplify the organizational process by using small tasks.

You can find everyday examples of algorithms and as you can see, they are a set of instructions or directions that allow you to achieve a specific goal or task. As you’ve probably also noticed there can be many different ways to achieve that goal or solve the problem.

So the next time you are tackling algorithms, don’t freak out. While it might be very intimidating and seem impossible — remember that they are like everyday problems. All you need to do is break it down into smaller instructions and always remember there isn’t always one way to solve them!

--

--

Kristen Cadacio

Software engineer. Always striving to learn new technologies and expand my knowledge.