Introduction to Algorithms

CodeCraftingLab

Introduction to Algorithms

What are Algorithms?

An algorithm is a set of step-by-step instructions to solve a given problem or achieve a specific goal. Pommes Frites Recipe Pommes Frites Recipe A cooking recipe written on a piece of paper is an example of an algorithm, where the goal is to make a certain dinner. The steps needed to make a specific dinner are described exactly. When we talk about algorithms in Computer Science, the step-by-step instructions are written in a programming language, and instead of food ingredients, an algorithm uses data structures. Algorithms are fundamental to computer programming as they provide step-by-step instructions for executing tasks. An efficient algorithm can help us to find the solution we are looking for, and to transform a slow program into a faster one. By studying algorithms, developers can write better programs.

Algorithm examples:
  • • Finding the fastest route in a GPS navigation system
  • • Navigating an airplane or a car (cruise control)
  • • Finding what users search for (search engine)
  • • Sorting, for example sorting movies by rating
The algorithms we will look at in this tutorial are designed to solve specific problems, and are often made to work on specific data structures. For example, the 'Bubble Sort' algorithm is designed to sort values, and is made to work on arrays.
Last Updated: 3/31/2024, 4:06 PM UTC
GoTo Top