[Solved] How can i find the n largest integers in an array and returns them in a new array [closed]


Using Linq is very simple:

var newArray = array.OrderByDescending(x => x).Take(n).ToArray();

2

solved How can i find the n largest integers in an array and returns them in a new array [closed]