Skip to content

Instantly share code, notes, and snippets.

@run-dlang
Created October 2, 2023 18:01
Show Gist options
  • Save run-dlang/108452b2fd0c45aef7145cbc68aa34e7 to your computer and use it in GitHub Desktop.
Save run-dlang/108452b2fd0c45aef7145cbc68aa34e7 to your computer and use it in GitHub Desktop.
Code shared from run.dlang.io.
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