ruby-uebungen/Assignment_023/solution
Thomas Smits 58bc23516c Update of exercises 2023-05-25 17:49:42 +02:00
..
readme.md Update of exercises 2023-05-25 17:49:42 +02:00

readme.md

Lösung: Hashes

worte = %w{ Bier Schnaps Bier Vodka Rum Baileys Rum Bier Vodka Bier Hugo }

def de_dupe(input)
  hash = {}
  input.each { |e| hash[e] = true }
  hash.keys.sort
end

puts de_dupe(worte)