
查找
xxx123112
这个作者很懒,什么都没留下…
展开
-
AVL添加
#include <stdlib.h>#include <stdio.h>#include "avl.h"int get_height(node_t *temp); int get_height(node_t *); int get_max(int a, int b); node_t* avl_insert(node_t *root, int val){ node_t *temp = (node_t*)malloc(sizeof(node_t));原创 2021-06-16 09:27:58 · 106 阅读 · 0 评论 -
哈希表创建
哈希表创建#include <stdio.h>#include <stdlib.h> #include "hash.h"HashTable* create_hash(int size){ HashEntry **ha = (HashEntry**)malloc(sizeof(HashEntry*)*size); if(!ha){ free(ha); //感觉并不是很必要的, return NULL; } me原创 2021-06-14 16:12:14 · 188 阅读 · 2 评论 -
哈希表添加
哈希表添加如有可以改进的地方,欢迎留言#include <stdio.h> #include "stdlib.h" #include "hash.h"void copy(char* new_str, const char* old_str); HASH_RESULT hash_add_int(HashTable *table, const char *key, int value ){ if(!key) return HASH_ERROR; long hash =原创 2021-06-14 17:29:01 · 316 阅读 · 0 评论