We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7952ca4 commit 82254a6Copy full SHA for 82254a6
02/solution.rb
@@ -4,7 +4,7 @@
4
5
# First part
6
c = data.map{|row| row.split("")}
7
- .map{|row| row.uniq.map{ |char| row.count(char) if row.count(char)!=1 }.compact.uniq}
+ .map{|row| row.uniq.map{ |char| row.count(char) if [2, 3].include? row.count(char) }.compact.uniq}
8
.reduce([], :concat)
9
10
puts "First part: " + c.uniq
0 commit comments