Truecaller Interview Question

A hamiltonian path problem.