Solution (source code)

= Solution

A <Hamilton cycle> is a <cycle> visiting every <vertex> of a finite <graph> exactly once before returning to its starting point. A <Hamilton path> is a <path> visiting every <vertex> exactly once, with no requirement to return or to have its endpoints adjacent. Both conditions concern visiting vertices, rather than traversing every edge.