Modified solution to run faster, using the rule of odd deltas.