using System.Collections.Generic;
static void Main(string[] args)
var list = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
var sorted = SortMinMax(list);
foreach (var i in sorted) Console.WriteLine(i);
private static List<int> SortMinMax(List<int> list)
var result = new List<int>();