hasEulerPath(G,src,dest):
| Input graph G, vertices src,dest
| Output true if G has Euler path from src to dest
| false otherwise
|
| if src≠dest then // non~circuitous path
| if degree(G,src) or degree(G,dest) is even then
| return false
| end if
| else if degree(G,src) is odd then // circuit
| return false
| end if
| for all vertices v∈G do
| if v≠src and v≠dest and degree(G,v) is odd then
| return false
| end if
| end for
| return true
|