Greedy TSP

Starting this assignment is contingent on you having a working Graph implementation. For this assignment we will be using our graph in an implementation of a greedy algorithm for finding a locally optimal solution to the Traveling Salesperson Problem (TSP). The algorithm we'll be using is 2-opt. As usual, make sure to merge/copy your graph.go file into the 2opt branch of the graph repository.

Functions

You will be implementing two functions for this assignment in 2opt.go.

Note that you will want to be careful with the semantics of slicing arrays in Go. You will want to create a copy of the current tour before performing swaps or slicing on it. Also, you can assume the graph is fully connected.