Algorithms

This part of the program introduces the principles of design, analysis and optimization of algorithms, addressing control structures, decomposition into sub-problems, complexity, as well as classic programming and problem-solving methods.

Preparing Your Program
Linear and Quadratic Complexity
When seeking to solve a problem with an algorithm, it's essential to measure its efficiency. Complexity allows estimating the necessary resources (time, memory) based on the size of data to process.
Protecting Constant Variables
When retrieving data, for example from a CSV file, it's essential to protect variables that must remain unchanged. We'll see some simple best practices to avoid involuntary errors.
Selection Sort
Selection sort is a simple sorting algorithm that works by selecting the smallest (or largest) element from a list and placing it in the correct position. It's often used to illustrate basic sorting algorithm concepts.
Loop Invariant
When programming a loop, it's often useful to be able to reason about what doesn't change during its execution. This is called a loop invariant.