This is not a solution to the TSP. Your pseudocode describes a depth first search using recursion. The TSP simply starts with a set of nodes, without any vertices at all (or vertices from each node to each other node really), and you consider every possible vertex to determine the shortest hamiltonian cycle. Plus you need weights to each vertex, since that is kind of the whole point.