Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 675 Bytes

readme.md

File metadata and controls

23 lines (18 loc) · 675 Bytes

TSP Demo

Background:

You are a successful salesman working for a big company. You have 32 big accounts around the globe to visit on a periodic basis, and you have been assigned the project of saving money on your already dilated travel expense allowance. Given a list of your companies' GPS locations, write a script that will help you find the shortest path to visit all 32 places once.

Solution

  1. TSP: Calculating all the paths from the first city
  2. TSP NNA: Using Nearest neighbor algorithm

Input File

CityName \t Latitude \t Longitude

cities.txt

Requirements:

Ruby 2.4.0

ToDo

  1. Create a Ruby GEM with all the logic
  2. Use Threads