Update solver.rb

Successfully implements the binary sort.