euler Algorithm

In graph theory, an Eulerian trail (or Eulerian path) is a trail in a finite graph that visits every edge precisely once (letting for revisiting vertices).Similarly, an Eulerian circuit or Eulerian cycle is an Eulerian trail that begins and ends on the same vertex.

euler source code, pseudocode and analysis