## Algorithm

• FAQ
• Courses
• Certifications
• Careers
• Jobs
• Companies
• Skills
• Articles

# What Is an Algorithm?

An algorithm is a set of instructions implemented by software engineers and data scientists to transform input data into output data through a computational series of arithmetic, decision making and repetition. Algorithms provide computers with a series of instructions that transform data into usable knowledge. Every algorithm is essentially trying to make a decision, often as part of a series of decisions, to ensure a computational input is processed and transmitted as usable data based on the task it’s trying to accomplish.

## 3 Examples of Algorithms

1. Binary search algorithms take sorted arrays of data and return the index of the value for which you’ve searched. Essentially, this type of algorithm determines where a value exists within a specific set of data or if it exists within the data set at all.
2. Merge sort algorithms operate in a divide-and-conquer manner, similar to binary search. Where the two differ, however, is that merge sorting separates all elements into individual elements, continuing until every individual element exists in an index of its own, and then merges the elements and sorts them in an understandable order based on the input.
3. Adding/removing items from a linked list means you can restructure linked lists so that nodes can be inserted or deleted from a specific location. Engineers and computer scientists can locate exactly where the node that needs to be inserted or removed is located as well as the pointers where the desired change should be rearranged.

## How Does an Algorithm Work?

An algorithm consists of a series of three steps: the input, the computation and the output.

An input is the data that is fed into an algorithm to begin the computation process.

The computation process then applies arithmetic, decision making and repetition to create “if x, then y” equations to ensure only the proper data is fed through to the output. Many algorithms use machine learning

The output process is the algorithm’s expression of its conclusion. This can be in the form of information displayed to a user, or much more commonly, as more data that becomes the input for another algorithm in a string of processes that enable a computer to make complex decisions in real time.

Related Reading on Built InWhy Is Logistic Regression a Classification Algorithm?

## What Are Some Examples of an Algorithm?

Three key algorithms commonly used include binary search, merge sort and adding/removing from a linked list.

### Binary Search

Binary search algorithms take sorted arrays of data and return the index of the value for which you’ve searched. Essentially, this type of algorithm determines where a value exists within a specific set of data or if it exists within the data set at all. There are five steps this algorithm will perform in its search:

1. It finds the midpoint of the sorted array.
2. It compares the midpoint of the data to the value being searched.
3. The algorithm then searches the right half of the array if the midpoint is larger than the value.
4. If the midpoint is smaller than the value, it will search the left half of the array.
5. Finally, the steps repeat until the algorithm finds the midpoint value or determines it doesn’t exist in the data set.

### Merge Sort

Merge sort algorithms operate in a divide-and-conquer manner, similar to binary search. Where the two differ, however, is that merge sorting separates all elements into individual elements, continuing until every individual element exists in an index of its own, and then merges the elements and sorts them in an understandable order based on the input.

Merge sort algorithms manage both the dividing and merging processes simultaneously to provide faster results to the user.

Linked lists utilize nodes and pointers as opposed to arrays, which allows some processes to perform much more efficiently. Nodes house a piece of data and a pointer that directs it to the next node, allowing data to consistently feed in a specific direction.

Linked lists can be restructured so that nodes can be inserted or deleted from a specific location. Engineers and computer scientists can locate exactly where the node that needs to be inserted or removed is located as well as the pointers where the desired change should be rearranged, allowing items to be removed from the middle of a collection without having to shift the remainder of the data structure in memory. This makes for more efficient insertions and deletions.

More on Lists From Built In ExpertsHow to Append Lists in Python

## What Is the Best Way to Analyze an Algorithm?

In order to ensure an algorithm is as efficient as possible, there are several methods of analysis that check execution speed and memory usage across several use cases.

Algorithm analysis begins with counting the number of operations needed to determine an answer across different input variables. For example, a linear search algorithm, which searches for values in a list, will check every value on a given list to see if it matches the target value. Once the value is found, it immediately returns to the index. If no value is found, the equation returns `-1`.  The number of checks necessary to find the target value will determine the execution speed of the algorithm. This execution speed will vary depending on the target value and the values present in the list, so several values should be checked to determine a relative average speed.

Other variables are necessary to determine the actual running speed of an algorithm, such as the speed of the computer, the programming language and the translation of that language into machine code. To get an accurate measurement of how an algorithm will run on a particular device, it must be made to run. This is possible by implementing the algorithm in an actual programming language, and in JavaScript, using the searchList function. This function will tell the amount of time it takes an algorithm to search a specific length of numbers in a list in milliseconds. By measuring the efficiency of different types of algorithms for a given set of values, programmers and data scientists can determine the best algorithm to use for specific use cases.

Courses

## Expand Your Algorithm Career Opportunities

Boost your skill set and develop by learning more about algorithms with Udemy.

Flatiron School

Whether you dabble in data, have an existing degree, or are brand new to the discipline, this data science course is for you. No matter where you are in your career, our course takes you from foundational…

Flatiron School

Whether you dabble in data, have an existing degree, or are brand new to the discipline, this data science course is for you. No matter where you are in your career, our course takes you from foundational…

Udemy

This course is about data structures, algorithms and graphs. We are going to implement the problems in Python programming language. I highly recommend typing out these data structures and…

Udemy

Welcome to Data Structures & Algorithms in Python

This course makes learning to code fun and makes hard concepts easy to understand.

How did I do this?…

Certifications

## Algorithm Certifications + Programs

These top software engineering certifications from Udacity could be the key to taking your next step.

General Assembly’s Data Science part-time course is a practical introduction to the interdisciplinary field of data science and machine learning, which lies at the intersection of computer science, statistics, and business. You will learn to use the Python programming language to acquire, parse, and model data for informing business strategy.

This is a fast-paced course with some prerequisites. Students should be comfortable with programming fundamentals, core Python syntax, and basic statistics. There is an option to complete up to 25 hours of online preparatory lessons. Talk to the General Assembly Admissions team to discuss your background and confirm if this is the right fit for you..

What you'll accomplish

A significant portion of the course is a hands- on approach to fundamental modeling techniques and machine learning algorithms. You’ll also practice communicating your results and insights by compiling technical documentation and a stakeholder presentation. Throughout this expert-designed program, you’ll:

• Perform exploratory data analysis with Python.
• Build and refine machine learning models to predict patterns
• from data sets.
• Communicate data-driven insights to technical and non-technical audiences alike.
• Apply what you’ve learned to create a portfolio project: a predictive model that addresses a real-world data problem.

Why General Assembly

Since 2011, General Assembly has graduated more than 40,000 students worldwide from the full time & part time courses. During the 2020 hiring shutdown, GA's students, instructors, and career coaches never lost focus, and the KPMG-validated numbers in their Outcomes report reflect it. *For students who graduated in 2020 — the peak of the pandemic — 74.4% of those who participated in GA's full-time Career Services program landed jobs within six months of graduation. General Assembly is proud of their grads + teams' relentless dedication and to see those numbers rising. Download the report here.

Your next step? Submit an application to talk to the General Assembly Admissions team

Note: reviews are referenced from Career Karma - https://careerkarma.com/schools/general-assembly

Udacity
Intermediate
4 months
10 hours

General Assembly’s Software Engineering Immersive is a transformative course designed for you to get the necessary skills for a coding role in three months.

The Software Engineering bootcamp is led by instructors who are expert practitioners in their field, supported by career coaches that work with you since day one and enhanced by a career services team that is constantly in talks with employers about their tech hiring needs.

What you'll accomplish

As a graduate, you’ll have a portfolio of projects that show your knowledge of fundamental programming concepts, as well as experience with languages, frameworks, and libraries that employers demand. Throughout this expert-designed program, you’ll:

• Create a front-end web application with modern JavaScript frameworks such as Angular or React.

• Develop and deploy full-stack applications with in-demand technologies such as Ruby on Rails, Python with Django, and Express with Node.js.

• Build secure full-stack applications by leveraging common design and architectural patterns like model–view–controller (MVC) and Representational State Transfer (REST).

• Practice version control and collaborative software development with Git and GitHub.

• Safely model and store data in SQL and NoSQL databases.

• Consume and integrate third-party application programming interfaces (APIs) in an application.

Why General Assembly

Since 2011, General Assembly has graduated more than 40,000 students worldwide from the full time & part time courses. During the 2020 hiring shutdown, GA's students, instructors, and career coaches never lost focus, and the KPMG-validated numbers in their Outcomes report reflect it. *For students who graduated in 2020 — the peak of the pandemic — 74.4% of those who participated in GA's full-time Career Services program landed jobs within six months of graduation.  General Assembly is proud of their grads + teams' relentless dedication and to see those numbers rising. Download the report here.

Your next step? Submit an application to talk to the General Assembly Admissions team

Note: reviews are referenced from Career Karma - https://careerkarma.com/schools/general-assembly

Udacity
Intermediate
4 months
10 hours

In this course you will learn data structures and algorithms by solving 80+ practice problems. You will begin each course by learning to solve defined problems related to a particular data structure and algorithm. By the end of each course, you would be able to evaluate and assess different data structures and algorithms for any open-ended problem and implement a solution based on your design choices.

Udacity
Intermediate
4 months
10 hours
Careers

Jobs

Companies