How to sort only the first k elements of an array using sort method?

In reply to karan_18:

Thanks karan for the answer.
I have one question can we do like this using sort method??


q.sort with (item.index > 5);

Such that it only sort the elements of the of the array from index > 5.