ref:
http://stackoverflow.com/questions/10606734/what-are-recursive-arrays-good-for
# BEAUTIFUL_STRINGS (Facebook Hacker Cup 2013 Hackathon) | |
File.open(ARGV[0]).each_line do |line| | |
next if line.chomp.empty? | |
single_word_character_statistic =[] | |
l=line.chomp | |
l.split.each_with_index do |v,i| | |
s_v=v.chars.sort { |x,y| x.downcase <=> y.downcase } |
#Create an array with 'size' rand numbers between 's_n' and 'e_n'
size=10
s_n=0
e_n=100
arr=Array.new(size){ rand(s_n..e_n) }