数据结构
基础数据结构脊椎版。适用于小白。
续更ing
每天要吃一桶饭
持续性话痴,间歇性话唠。
展开
-
数据结构——二叉树之七种遍历
本篇主要来实现二叉树的遍历 1.递归实现 三种递归遍历的方式 本质上压栈顺序是相同的。 printf位置决定访问顺序。 (即遍历一次二叉树时,一个结点有三次访问的机会,printf的位置决定哪一次访问) //先序遍历 void preOrderTraverase(TreeNode *t) { if(t) { printf("%d",t->_data)...原创 2019-08-15 18:35:45 · 201 阅读 · 0 评论 -
数据结构——linkQueue
链队列 typedef struct node { char data; struct node *next; }Node; typedef struct queue { Node *front; Node *rear; }Queue; void initQueue(Queue *q); int isQueueEmpty(Queue *q); void e...原创 2019-08-14 22:16:55 · 683 阅读 · 0 评论 -
数据结构——loopQueue、
循环队列。 loopQueue.h #include "loopqueue.h" typedef struct queue { int front; int rear; char *space; int len; }Queue; void initQueue(Queue *q,int len); int isQueueFull(Queue ...原创 2019-08-14 22:15:05 · 231 阅读 · 0 评论 -
数据结构——linkStack、
2.链栈 link_stack.h #include "link_stack.h" #include <stdlib.h> #include <stdio.h> typedef struct _SNode { char _data; struct _SNode * _next; }SNode; typedef struct _Stack { ...原创 2019-08-13 20:55:09 · 543 阅读 · 1 评论 -
数据结构——sequenceStack
1.顺序栈 sestack.h #include "sestack.h" typedef struct _stack { int len; int top; char *space; }Stack; void initStack (Stack *ps, int len); int isStackFull (Stack *ps); int isStackEmpty ...原创 2019-08-13 20:52:48 · 305 阅读 · 0 评论 -
数据结构——二十分钟盲打动态链表 (内附排序优化&删除优化版本)
此代码实现了动态链表的原创 2019-05-28 23:17:11 · 142 阅读 · 0 评论