Skip to content

Latest commit

 

History

History
3 lines (2 loc) · 316 Bytes

File metadata and controls

3 lines (2 loc) · 316 Bytes

Chapter. Nearest Neighbor

The nearest neighbour algorithm was one of the first algorithms used to solve the travelling salesman problem. In it, the salesman starts at a random city and repeatedly visits the nearest city until all have been visited. It quickly yields a short tour, but usually not the optimal one.