Wolabi Interview Question

Problem given relating to Hamiltonian path.