# Algorithms

## Heapsort temporal complexity explained

The heapsort algorithm temporal complexity is O(nlgn). In this post, I’ll explain step-by-step why that is the temporal complexity. We use asymptotic notation to express the running time of an algorithm as a function of the input’s size. As a short reminder, an algorithm’s (theoretical) temporal complexity is the lowest bound for the function that […]

## Temporal complexity of recursive algorithms

We use the big-O notation to calculate the temporal complexity of algorithms. In this post, I’ll show how to calculate the temporal complexity of recursive algorithms. As a reminder, an algorithm is a finite sequence of steps that, when executed in a certain order, solve a problem. A problem is a pair (E, S) where

## Temporal complexity of iterative algorithms

We use the big-O notation to calculate the temporal complexity of algorithms. In this post, I’ll show how to calculate the temporal complexity of iterative algorithms. As a reminder, an algorithm is a finite sequence of steps that, when executed in a certain order, solve a problem. A problem is a pair (E, S) where

## Big-O notation in algorithms

We use big-O notation to describe the growth of functions. In the case of algorithms, we use it to calculate the temporal complexity of an algorithm with respect to the algorithm’s input. We use big-O notation in algorithms, to calculate the theoretical temporal complexity of an algorithm. The main advantage of the big-O notation is

## Example of calculating the practical/real temporal complexity of two algorithms

In this post, I’ll show you an example of how to calculate the practical time complexity of two algorithms that solve the same problem. As you should remember from the previous post, we calculate temporal complexity to assess how efficient an algorithm is compared to another algorithm. By doing this, we can choose the best

## What is the temporal complexity of an algorithm?

The temporal (or time) complexity of an algorithm is a measure of the time the algorithm takes to be executed and give an output, as a function of the size of the input. The time complexity can be calculated in two ways: Practical temporal complexity The practical way depends on the specific implementation of the

## Applying algorithms for beginners

Applying algorithms is the goal when you want to use a programming language to solve problems. In the last unit of this course we studied how to create simple algorithms. This one, is about how to apply those algorithms using a programming language. If you missed the first unit, you can find it here. Notice

## Where do I start to learn programming/coding?

You will find many answers to the question where do I start to learn programming. I’ve been teaching programming for more than 20 years. So, here I’ll show you where do I think it is better to start according to my experience. According to my experience and the feedback I get every year from my

## Lesson 4: Recap and algorithm examples

In this lesson I’ll make a recap of the unit. You will see two algorithm examples of everything we studied in this unit together. I will focus on how to use algorithms, with conditionals and repetitions, to solve problems. Also, at the end of the lesson I will give a problem for you to solve

## Lesson 3: Algorithms with repetitions

In this lesson you will learn an important topic: algorithms with repetitions (a.k.a. loops). You will see how to solve problems creating algorithms with repetitions. During the lesson you will see some examples. The approximate time to complete this lesson is 20 minutes. Transcription Welcome back. So far, we studied algorithms, conditionals relational and logical