What is the principle of the sorting function sort
This article will explain in detail how to use the sorting function sort for everyone. The quality of the article content is high. Therefore, Xiaobian shares it with you as a reference. I hope that after reading this article, you will have a certain understanding of relevant knowledge.
function name function description sort all elements of a given interval stable sort all elements of a given interval partial sort partial sort copy and sort nth element of a given interval is sorted determine whether an interval has been sorted partition so that elements meeting a condition are placed first stable partition so that elements meeting a condition are placed first
To use this function, simply use #include, sort, and the syntax is described as:
sort(begin,end), indicates a range,
For example:
int _tmain(int argc, _TCHAR* argv[]) { int a[20]={2,4,1,23,5,76,0,43,24,65},i; for(i=0;i