提交 81e39569 创建 作者: 宋海霞's avatar 宋海霞

modify

上级 7495e7b2
...@@ -7,13 +7,13 @@ int main(int argc, char* argv[]) ...@@ -7,13 +7,13 @@ int main(int argc, char* argv[])
int i; int i;
// //
// 初始化关键字数组 // Initializes the keyword array
// //
int KeyArray[] = {13, 14, 35, 54, 68, 75, 94, 27, 55, 11, 15, 79}; int KeyArray[] = {13, 14, 35, 54, 68, 75, 94, 27, 55, 11, 15, 79};
int length = sizeof(KeyArray)/sizeof(KeyArray[0]); int length = sizeof(KeyArray)/sizeof(KeyArray[0]);
// //
// 构造哈希表 // Construct the hash table
// //
Hash(KeyArray, length); Hash(KeyArray, length);
...@@ -30,23 +30,23 @@ int main(int argc, char* argv[]) ...@@ -30,23 +30,23 @@ int main(int argc, char* argv[])
} }
/* /*
功能: function:
用给定的一组关键字数组构造哈希表。 Construct a hash table with a given set of keywords.
参数: parameter:
KeyArray -- 关键字数组指针 KeyArray -- Keyword array pointer
length -- 数组的长度 length -- The length of the array
*/ */
void Hash(int* KeyArray, int length) void Hash(int* KeyArray, int length)
{ {
int i; // 游标 int i; // The cursor
int z; // 增量 int z; // The incremental
int address; // 哈希地址 int address; // Hash address
int count; // 再散列次数 int count; // The number of rehashes
int newaddress; // 新哈希地址 int newaddress; // New hash address
// //
// TODO: 在此添加代码 // TODO: Add the code here
// //
} }
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论