Source: http://cregut.perso.enseeiht.fr/ENS/2012-apad-algo1/algo1-apad-2012-s1-cours__C-corrige.pdf