'scala find the max value in a list of lists

so I'm currently learning scala and found a problem: I have a List of lists

List(
  List(8, 9, 10, 9, 8), 
  List(12, 9, 12, 8, 7), 
  List(12, 3, 12, 3, 2)
)

and want to find the max value for example:

List(12, 9, 12, 9, 8)

How can I achieve that result?

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source