Last active
December 28, 2015 09:29
Revisions
-
armandocanals renamed this gist
Jul 15, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
armandocanals created this gist
Nov 15, 2013 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ # This is a dump of the word list text = File.read ARGV[0] words = text.split("\n") hash = {} words.each do |word| word.each_char do |l| hash[l] ||= 0 if hash.keys.include?(l) hash[l] += 1 end end end p hash.sort_by {|k, v| v}.reverse