Created
October 2, 2023 18:01
-
-
Save run-dlang/108452b2fd0c45aef7145cbc68aa34e7 to your computer and use it in GitHub Desktop.
Code shared from run.dlang.io.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std; | |
int mod(int dividend, int divisor){ | |
return dividend % divisor; | |
} | |
void main() | |
{ | |
writeln("Hello D", mod(5,2)); | |
// h = hash | |
// x = key | |
// M = hashDigest | |
// m = size of the table | |
// implementationFormula = hash(key) mod(hashDigest, sizeOftheTable); | |
mathHashByDivisionFormula = h(x) mod(M, m); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment