-1
这是我正在处理的脚本的一部分,它肯定会返回并排列数组,但我希望得到的结果是[[:a, :c].to_set,[:b,:c].to_set].to_set
而不是[[:c, :b], [:c, :a]]
。数组返回子集
@potentially_alive = Array.new
if (self_defended?(s))
@potentially_alive.delete_if { |pa| pa.subset?(s.to_set)}
@potentially_alive.push(s.to_set)
end
对不起,这种解决方案将取代哪里 – 2012-02-24 10:01:01