Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import scala.io.Source
- object day6 extends App {
- val input = Source.fromFile("day6.txt").getLines.toList
- println((input.transpose map (x => x.groupBy(identity).mapValues(_.size).maxBy(_._2)._1)).mkString)
- println((input.transpose map (x => x.groupBy(identity).mapValues(_.size).minBy(_._2)._1)).mkString)
- }
Advertisement
Add Comment
Please, Sign In to add comment