Q:

Integer array Get difference between two highest numbers

I have a List<int[]> that I populated by splitting an integer array into 4 groups. Now I need to get the difference of the two highest numbers in the array. I tried Array.Sort but I am stuck on how to continue.
What I have done so far?
    public static void solution(int[] T)
    {
        List<int[]> splitted = new List<int[]>();//This list will contain all the splitted arrays.
        int lengthToSplit = T.Length / 4;

        int arrayLength = T.Length;

        for (int i = 0; i < arrayLength; i = i + lengthToSplit)
        {
            int[] val = new int[lengthToSplit];

            if (arrayLength < i + lengthToSplit)
            {
                lengthToSplit = arrayLength - i;
            }
            Array.Copy(T, i, val, 0, lengthToSplit);
            splitted.Add(val);
        }

        //this is the part where I must get the difference between the two highest numbers in an integer array and put into another list.

  foreach (int[] integerarray in splitted)
    {
      //get the difference of the two highest numbers per integer array and place it on another List<int>
    }

    }

A:

get the difference between the two highest numbers in an integer array
  and put into another list

You can use LINQ and Math.Abs:
List<int> differenceList = splitted
  .Select(list => list.OrderByDescending(i => i).Take(2).ToArray())
  .Select(highestTwo => Math.Abs(highestTwo[0] - highestTwo[1]))
  .ToList();

