OK. After lots of work finally, I managed to solve 1st puzzle of day 13th by counting same rows: same_rows = Hash.new([]) pattern.each_with_index{|row,i| same_rows[row] += [i] } Oh, your brute force method was nice. I have to remember that sometimes simply methods are right ones.
You are truly a brilliant teacher, my dude.
Thanks, Mike!
OK. After lots of work finally, I managed to solve 1st puzzle of day 13th by counting same rows:
same_rows = Hash.new([])
pattern.each_with_index{|row,i| same_rows[row] += [i] }
Oh, your brute force method was nice. I have to remember that sometimes simply methods are right ones.