How to write a function that takes an array of integers, and returns an array of integers. The return value should contain those integers which are most common in the input array.

```
List(5, 4, 3, 2, 4, 5, 1, 6, 1, 2, 5, 4)  => List(5, 4)
List(1, 2, 3, 4, 5, 1, 6, 7)              => List(1)
List(1, 2, 3, 4, 5, 6, 7)                 => List(1, 2, 3, 4, 5, 6, 7)

```

I have already tried the following approach:

```
def mostFreq(info: List[List[String]]): (String, Int) = 
  info.flatten.groupBy(identity).mapValues(_.size).maxBy(_._2)

```

but it does not handle the ties.