Knights_Travails in Ruby using Binary Tree