example from the clever-algorithms