Wystarczy użyć funkcji std::sort.
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main()
{
vector<int> data { 1, 3, 2, 5, 4, 6, 7, 8, 9, 21, 24, 101 };
sort( begin(data), end(data) , []( int a , int b ){ return b%2==0; } );
for( const auto& element : data ) cout << element << ' ';
}