Sha256: 2cd53d2a8461c09eefec12fe01b323c32e9407744d2ab8040bf9f8ca7faf1b82

Contents?: true

Size: 225 Bytes

Versions: 1

Compression:

Stored size: 225 Bytes

Contents

class Sorter
  def select_sort
    tmp = self.dup
    res = []
    res.push tmp.delete_min until tmp.empty?
    res
  end
  def delete_min
    min_idx = find_index { |item| item == self.min }
    delete_at(min_idx)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
group_d_2016_gem-0.1.0 select_sort