added find, more tests

This commit is contained in:
2026-08-18 09:08:01 -05:00
parent 0ee2fe8874
commit a1862f54c1
9 changed files with 69 additions and 19 deletions
+17
View File
@@ -0,0 +1,17 @@
#include <stddef.h>
void keke_swap(void *a, void *b, size_t size) {
char *aa = a;
char *bb = b;
for(size_t i = 0; i < size; i++) {
aa[i] ^= bb[i];
bb[i] ^= aa[i];
aa[i] ^= bb[i];
}
}
size_t next_power_of_two(size_t s) {
size_t t = 1;
while(t < s) t <<= 1;
return t;
}