An o(n!) algorithm to travel the globe as fast as possible
Ruby
Latest commit 74cc44c Jan 26, 2014 @jwo jwo Merge pull request #10 from noahpatterson/patch-1
Texas.gov redesign changed the class names, update to reflect.
Permalink
Failed to load latest commit information.
lib
spec Use spaces, not tabs Dec 26, 2012
.gitignore
Gemfile use https for rubygems Dec 26, 2012
Gemfile.lock use https for rubygems Dec 26, 2012
LICENSE Initial working May 15, 2012
README.md Update Readme.md with the new Nokogiri code Jan 25, 2014
rakefile.rb Initial working May 15, 2012
salesperson.rb Initial working May 15, 2012

README.md

Episode 7 - Salesman Traveler

An o(n!) algorithm to travel the globe as fast as possible

Panda Level

  1. Implement your own route for errands around town. Is the algorithm making the same choices you would?
  2. Instead of assuming the first point is your starting point, tell the SalesPerson what their starting point is

Tiger Level

  1. Implement benchmarking code to see how long it will take to calculate for 2, 10, 50, and 200
  2. Sample benchmarking code: http://rubyfiddle.com/riddles/68404

Eagle Level

  1. Implement the "salesperson should log the total miles"
  2. Output the total traveling time (assume 55 mph)

Show Links

Sample Nokogiri Code

require 'nokogiri'
require 'open-uri'
doc = Nokogiri::HTML(open('http://www.texas.gov/en/discover/Pages/topic.aspx?topicid=/government/localgov'))
doc.css(".topic-subcategory-link a").map do |node|
  puts node.content
end

Copyright: Jesse Wolgamott, MIT License (See LICENSE)