felipernb/algorithms.js — pull request #49 by eush77 (2014-06-06 00:39:21+00:00)
Title: Add Euler path algorithm

The algorithm is dfs-based and similar to topological sorting.

It is essentially the same as Hierholzer's algorithm:
https://en.wikipedia.org/wiki/Euler_path#Hierholzer.27s_algorithm

It works both for directed and undirected graphs and can compute both tours and walks (whether the first vertex must be the last one or not).