Basic algorithms¶
Part 1 of the course, volume 1 of the lecture notes. The representation of numbers and pseudo-code, the language in which all the algorithms of the course are written; the first algorithms: sorting (insertion, exchange and selection sort), linear and binary search, numerical algorithms (change of base, primality test, sieve of Eratosthenes, greatest common divisor). Every algorithm with its pseudo-code and examples executed step by step.
-
1. Representation of numbers
Representation of natural numbers · Representation of integer numbers · Representation of real numbers
-
2. Pseudo-code
Introduction to pseudo-code · Variables and assignments · Basic operations · Basic constructs · …
-
3. Sorting algorithms
The sorting problem · Insertion Sort · Exchange Sort · Selection Sort · …
-
4. Linear and binary search
The search problem · Linear search · Binary search
-
5. Numerical algorithms
Change of base · Primality test · Sieve of Eratosthenes · Greatest common divisor