` element = [1] list = Array.new(3) { element } p list #[[1], [1], [1]] list[0][0] = -1 # should be [[-1], [1], [1]] p list # [[-1], [-1], [-1]] ` OK, and could you please figure out this one?fanjieqi (jieqi fan)
` element = [1] list = [element.clone] * 3 p list #[[1], [1], [1]] list[0][0] = -1 # should be [[-1], [1], [1]] p list # [[-1], [-1], [-1]] ` The list initialized as [ [1], [1] ]. Then we assign the list[0][0], which is 1, as -1,...fanjieqi (jieqi fan)