Source: https://frederic-junier.org/TS2013/Algos/TP2Dichotomie15.pdf