Can someone please explain how this sorting algorithm works? It's called "sequential_sort"
void sequential_sort(std::vector<unsigned int>& X) {
unsigned int i, j, count, N = X.size();
std::vector<unsigned int > tmp(N);
for (i = 0; i < N; i++) {
count = 0;
for (j = 0; j < N; j++) {
if (X[j] < X[i] || X[j] == X[i] && j < i)
count++;
}
tmp[count] = X[i];
}
std::copy(tmp.begin(), tmp.end(), X.begin());
}