Dual run for both algorithms - first and last first