如何编写一个C语言的hash表
下面是一个简单的C语言实现的hash表示例:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define SIZE 100
typedef struct Node {
char key[50];
int value;
struct Node* next;
} Node;
Node* hashtable[SIZE];
unsigned int hash(const char* key) {
unsigned int hash = 0;
for (int i = 0; key[i] != '