Answers for "sort index c++"

C++
0

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];} );
Posted by: Guest on July-22-2021

Browse Popular Code Answers by Language