- 博客(4)
- 收藏
- 关注
原创 链式哈希表的实现
哈希算法一般用于快速查找和加密算法chtbl.h#ifndef CHTBL_H #define CHTBL_H#include <stdlib.h>#include "list.h"/* Define a structure for chained hash tables. */typedef struct CHTbl_ {int buckets;int
2016-11-26 19:38:23 1350
原创 集合的实现
set.h#ifndef set_h #define set_h#include <stdio.h> #include "list.h"/*Implement sets as linked lists. */ typedef List Set;/* Public Interface. */ void set_init(Set *set, int (*match)(const void *key1,
2016-11-23 15:36:41 249
原创 单链表的实现
list.h#ifndef list_h #define list_h#include <stdlib.h> /** Define a structrue for linked list elements. */ typedef struct ListElmt_ { void *data; struct ListElmt_ *next; } ListElmt; /** Defi
2016-11-16 22:51:53 224
原创 memcpy函数 & 使用泛型指针交换任何类型数据
memcpy函数源码void *memcpy(void *dest,void *src, unsigned int count) { if (dest == src) return src; char* d = (char*)dest; char* s = (char*)src; while(count-- > 0) *d++ = *s++
2016-11-09 10:05:39 1105
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人