Source: https://past-exams.epidocs.eu/S2/Finals/Algo/2022/final-2022-s2-algo-correction-en.pdf