Wolabi interview question

Problem given relating to Hamiltonian path.