We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e2f2a6 commit 905c19aCopy full SHA for 905c19a
1 file changed
verify/verify-standalone-algorithm/standalone-radix-sort.test.cpp
@@ -0,0 +1,21 @@
1
+// competitive-verifier: STANDALONE
2
+
3
+#include "../../src/alfred/algorithm/radix-sort.hpp"
4
+#include <cassert>
5
+#include <random>
6
7
+const int N = 100000000;
8
9
+uint32_t a[N];
10
+std::mt19937 rng(std::random_device{}());
11
12
+int main(int argc, char const *argv[]) {
13
+ for (int i = 0; i < N; i++) {
14
+ a[i] = rng();
15
+ }
16
+ radix_sort(a, N);
17
+ for (int i = 1; i < N; i++) {
18
+ assert(a[i - 1] <= a[i]);
19
20
+ return 0;
21
+}
0 commit comments