Traveling Salesman Problem solver in CoffeeScript alogirthm