Add Euler path algorithm