Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion koodi.rb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
# kirjoita koodi tänne
# kirjoita koodi tänne

def esiintymat(taulukko)
hash = {}
taulukko.each do |alkio|
if !hash.include? alkio
hash[alkio] = 0
end
hash[alkio] += 1
end
hash
end