How do i sort a vector based on the frequency of its elements
example
my vector contains 10,11,12,10,11,13,11
i need to get the sorted out put as
11,11,11,10,10,12,13
the normal sort is
sort(vec.begin(), vec.end());
how do i sort it in that way