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

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -