return hashed value for a key * function : ID of hash function according to which key has to hashed * key : item to be hashed
function hash ( functionn , key ) { switch ( functionn ) { case 1 : return key % MAXN ; case 2 : return ( Math . floor ( key / MAXN ) ) % MAXN ; } return Number . MIN_VALUE ; }