数据结构
SteveRocket
总结技术,分享技术,交流技术,我们一起学习,韶华易逝......
展开
-
链式栈 (实现进制转换)
定义#define datatype inttypedef struct stacknode{ int num; datatype data; struct stacknode *pNext;}StackNode;StackNode * init(StackNode * phead);//初始化StackNode * push(StackNode * phead, int nu原创 2015-07-31 01:07:49 · 2187 阅读 · 1 评论 -
C语言实现链式队列
声明 Queue.htypedef struct queue{ int num; int high; struct queue *pNext;//存储下一个节点的地址}Queue;Queue * init(Queue *queueA);//初始化Queue * EnQueue(Queue *queueA, int num, int high);//入队Queue * DeQue原创 2015-07-31 00:53:57 · 449 阅读 · 1 评论 -
建立简单的哈希表
#include#include unsigned int SDBMHash(char *str){ unsigned int hash = 0; while (*str) { // equivalent to: hash = 65599*hash + (*str++); hash = (*str++) + (hash原创 2015-08-14 23:41:36 · 1154 阅读 · 1 评论 -
哈希运用于大数据查找中
使用哈希,实现6428633条CSDN账户数据的简单查询#define _CRT_SECURE_NO_WARNINGS#include #include char path[256] = "E:\\Big_Data\\csdn.txt";#define N 6428633unsigned int BKDRHash(char *str);struct beitai{ char原创 2015-08-14 23:51:30 · 1138 阅读 · 1 评论 -
封装 动态数组库 生成企业级lib实际应用库
封装企业级数组库,并成功生成相应的静态lib库,可直接用来调用并成功使用,实现数组的基本功能和操作原创 2015-08-04 23:57:22 · 481 阅读 · 1 评论 -
双链表:实现基本的增删查改,正反向现实双链表的节点
声明部分,头文件 list.h#include #include //双链表节点typedef struct LinkNode{ int data; struct LinkNode *pPre; struct LinkNode *pNext;}node;typedef struct head{ node *head;//指向头部 node *tail;//指向尾部}Li原创 2015-08-06 00:30:44 · 493 阅读 · 1 评论