Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

sort index c++

vector<int> V(n);
   std::iota(V.begin(),V.end(),0); //Initializing
   sort( V.begin(),V.end(), [&](int i,int j){return arr[i]<arr[j];} );
 
PREVIOUS NEXT
Tagged: #sort #index
ADD COMMENT
Topic
Name
4+3 =