Source: https://www.cril.univ-artois.fr/~koriche/Algorithmique-2012-TD3-Correction.pdf