53 const std::vector<uint64_t>& ar) {
55 std::vector<uint32_t> position(10, 0);
56 for (
int i = 0; i < n; ++i) {
57 position[(ar[i] / cur_digit) %
61 for (
int i = 0; i < 10; ++i) {
66 std::vector<uint64_t> temp(n);
67 for (
int i = 0; i < n; ++i) {
68 temp[position[(ar[i] / cur_digit) % 10]] =
71 position[(ar[i] / cur_digit) %
106 std::vector<uint64_t> ar1 = {432, 234, 143, 332, 123};
107 ar1 = sorting::radix_sort::radix(ar1);
108 assert(std::is_sorted(ar1.begin(), ar1.end()));
110 std::vector<uint64_t> ar2 = {213, 3214, 123, 111, 112, 142,
111 133, 132, 32, 12, 113};
112 ar2 = sorting::radix_sort::radix(ar2);
113 assert(std::is_sorted(ar2.begin(), ar2.end()));