数据结构
文章平均质量分 90
IT妹纸-沙漠里的饿鱼
这个作者很懒,什么都没留下…
展开
-
数据结构-二叉树
一、二叉树api实现 #include #include #include using namespace std; typedef struct node { struct node *pLChild; struct node *pRChild; }BiTNode, *PBiTree; typedef void (*BITREE_FUNC)(BiTNode *pNode);原创 2013-11-12 16:28:21 · 519 阅读 · 0 评论 -
数据结构-双向链表
一、双向链表-api #include #include typedef struct dll_node { dll_node *pPrev; dll_node *pNext; }DLL_NODE; typedef struct dl_list { DLL_NODE *pHead; DLL_NODE *pTail; int iSize; }DL_LIST; ty原创 2013-11-11 20:16:51 · 568 阅读 · 0 评论 -
数据结构-单向链表
数据结构-单向链表 前言:作为经常要使用的数据结构,单链和双链,c语言不像c++一样可以使用多态的特性,但我们又希望能够设计一组api,实现单链和双链的基本操作,可以用于任何数据结构,好比一条晾东西的铁链一样,每个环都有一个钩子,任何东西,只要能勾上哪个钩子,就可以晾在铁链上,这里需要用到"C语言基础(一)"里面提到的一个小技巧,通过结构体成员,计算offset。从而获得结构体的地址,从而可以访原创 2013-11-11 15:50:23 · 729 阅读 · 0 评论