随笔分类 - 数据结构
摘要:/* 栈: 1、什么叫栈:栈就是一个存储结构,简单的说就是一种存储的方式 2、栈是怎么存储的:栈是先进后出的一种存储结构,类似于箱子 3、栈的分类:静态栈、动态栈。 4、什么叫静态栈:类似于数组往箱子里放 5、什么叫动态栈:类似于链表往箱子里放 6、栈的应用有哪些:迷宫,表达式的计算,函数的调用,中断等,应用相当的广泛 7、栈的操作...
阅读全文
摘要:/* 队列: 1、什么叫队列:一个能够实现先进先出的存储结构 2、队列的分类:链式队列,静态队列(数组队列) 3、队列的参数:front,rear 静态队里: 1、静态队列为什么是循环队列:队列先进先出,不管我入队还是出队,front rear都得++,往上走。 当删除的时候,f往上走,内存就泄露。所以我需要用循环来解决这个问题。内...
阅读全文
摘要:#include #include #include typedef struct node { int data; struct node * pNext; }*pNode,Node; //#define bool int; //#define的意思是单纯的替换,与别名没有关系,而且C语言中没有bool数据类型 typedef int bool; //typedef的意思就是别名,或者是声...
阅读全文
摘要://链式二叉树: #include #include #include typedef struct btree { struct btree * pLBtree; char data; struct btree * pRBtree; }Btree,* pBtree; pBtree create_Btree(void); void traverse_Btree(pBtre...
阅读全文
浙公网安备 33010602011771号