Skip to content

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.

Lecture notes, volume 1 (PDF)

  • 1. Representation of numbers


    Representation of natural numbers · Representation of integer numbers · Representation of real numbers

    Read the chapter · Exercises

  • 2. Pseudo-code


    Introduction to pseudo-code · Variables and assignments · Basic operations · Basic constructs · …

    Read the chapter · Exercises

  • 3. Sorting algorithms


    The sorting problem · Insertion Sort · Exchange Sort · Selection Sort · …

    Read the chapter · Exercises

  • 4. Linear and binary search


    The search problem · Linear search · Binary search

    Read the chapter · Exercises

  • 5. Numerical algorithms


    Change of base · Primality test · Sieve of Eratosthenes · Greatest common divisor

    Read the chapter · Exercises