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