提交 5828125b 创建 作者: 宋海霞's avatar 宋海霞

modify

上级 ae823ec0
#ifndef SEARCHHASH_H_
#define SEARCHHASH_H_
//
// Include the C standard library header file here
//
#include <stdio.h>
//
// Other header files are included here
//
#include <stdlib.h>
//
// Define the data structure here
//
#define HASH_LEN 20 // The length of the hash table
// Hash table
typedef struct hterm{
typedef struct hterm
{
int key; // keyword
int si; // The number of rehashes
}HASH;
//
// Declare the function here
//
void Hash(int* KeyArray, int length); // The hash function
//
// Declare global variables here
//
extern HASH HashList[HASH_LEN];
extern int RandomArray[];
extern int Arraylength;
#endif /* CONSOLE_H_ */
......@@ -21,7 +21,7 @@ int main(int argc, char* argv[])
Hash(KeyArray, length);
printf("\nSubscript\tRehashesCount\tKeyword\t\n");
for(i=0; i<HASH_LEN; i++)
for (i=0; i<HASH_LEN; i++)
{
printf("%d", i);
printf("\t\t\t%d", HashList[i].si);
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论