Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby thingy
list = [['A', 'B', 'C'], ['A', 'C', 'E'], ['E', 'F', 'D'], ['D', 'A', 'J'], ['E', 'D', 'J']]
freq = {}
list.each do |seq|
seq.combination(2).each do |combo|
freq[combo.sort] = (freq[combo.sort] || 0) + 1
end
end
freq.keys.sort.each do |key|
puts "#{key.join(', ')}, #{freq[key]}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.