c# - How can i find the n largest integers in an array and returns them in a new array -


how can find n largest integers in array , returns them in new array.

using linq simple:

var newarray = array.orderbydescending(x => x).take(n).toarray(); 

Comments

Popular posts from this blog

ios - Memory not freeing up after popping viewcontroller using ARC -

Java JSoup error fetching URL -

webstorm - PhpStorm file cache conflict with TypeScript compiler -