Multiplication Table In AoH Structure
Aug 03
2008
2008
Comments Off
mt = Array.new(10) { |e| Hash.new { |h,k| h[k] = k * e } } mt[1][2] => 2 mt[2][2] => 4 mt[5][4] => 20 mt[9][5] => 45