Using `std::sort` does not garantee the initial order is kept for items with the same ranking value. Using `std::stable_sort` fixes the issue.
Using `std::sort` does not garantee the initial order is kept for items with the same ranking value. Using `std::stable_sort` fixes the issue.