|
ÇØ½¬ ÇÔ¼ö¿Í Ãæµ¹ ÇØ¼Ò
|
|
[
ÁÁÀº
ÇØ½¬ ÇÔ¼ö ] Index
Hash (const char *Key, int
TableSize ) { unsigned
int HashVal = 0; /*1*/ while(
*Key != '¡¬0' ) /*2*/ HashVal
= ( HashVal << 5 ) + *KEY++; /*3*/ return(
HashVal % TableSize ); }
¡Ø 5 Bit Shift´Â ¼ýÀÚ 10°³,
¾ËÆÄºª 20 ¿© °³¸¦ ÇÕÇÏ¿© 25 = 32¸¦ °öÇÏ´Â
°ÍÀÌ´Ù.
|