Stream operation with two dimensional array
Apologies for providing a full solution, I know you didn't ask for that, it was just easier for me to work through it by writing the code in full.

I'm initially approaching about by thinking about how would I solve this in a database using SQL, and then applying a similar approach in Java.

First thing to do here is group all the scores together by person. I'm going to end up with Map of some kind, keyed by the person. That means using the groupingBy collector. I need to provide a separate function for the key and the value. The value mapping is the interesting bit here, I was initially thinking I could just provide a list of the scores and average them in the next step, but then I stumbled across the averagingInt collector which saves me a step.

So now I have a map with each person's average score in. I don't need the names anymore, as I only need to return the score, so I'll just take the values() from the map and find the biggest. Keeping it streamy means using the max() method to get the result.

This seems to do the trick, and isn't too ugly.

public static void main(String[] args) {

     String[][] scores = { { "Amit", "70" }, { "Arthit", "60" }, { "Peter", "60" }, { "Arthit", "100" } };

     double highestAvg = Arrays.stream(scores)
           .collect(groupingBy(s -&gt; s[0],
                               averagingInt(s -&gt; parseInt(s[1]))))
           .values()
           .stream()
           .max(naturalOrder())
           .get();

     System.out.println(highestAvg)
}


It uses these static imports to keep things uncluttered

import static java.lang.Integer.parseInt;
import static java.util.Comparator.naturalOrder;
import static java.util.stream.Collectors.averagingInt;
import static java.util.stream.Collectors.groupingBy;


Note that I changed the average to a double because it saves another conversion and the result might need the decimals.

Something to think about - how could you change the data structure to clean this up further?