Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Hashing
//Title of this code #include <iostream> #include <cstring> using namespace std; int FNV1a_hash(const void *data, int length) { const char *p = static_cast<const char*>(data); int basis = 123456789; int prime = 12345; int hash = basis; for (int i = 0; i < length; ++i) hash = (hash ^ p[i]) * prime; return hash; } int main() { long num = 8; char* str = "helll1lo"; int size = strlen(str); cout << size << endl; cout << FNV1a_hash(str, size) << endl; }
run
|
edit
|
history
|
help
0
Find Case Combinations of a String
Khadijah Alshehhi
multi bitmap
Spejmer
an awesome question of basic graph traversal (786A)
Stream3
code
Prosta implementacja algorytmu Euklidesa (NWD)
remove dublicates from string using recursion
char