
数据结构
一位不想透露名字的路人甲
你想知道啥?
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
中缀表达式转为后缀表达式
zhong2hou.h /** * 这个程序是中缀表达式到后缀表达式的转换 * 使用栈的数据结构开实现 */ #ifndef ZHONG2HOU_H #define ZHONG2HOU_H #define elementType char struct my_stack_in_array { int capacity; int topOfStack; elementType *Array; }; typedef struct my_stack_in_array myStack;原创 2021-11-07 18:18:40 · 176 阅读 · 0 评论 -
使用数组表实现的栈
my_stack_in_array.h #ifndef MY_STACK_IN_ARRAY #define MY_STACK_IN_ARRAY #define elementType int struct my_stack_in_array { int capacity; int topOfStack; elementType *Array; }; typedef struct my_stack_in_array myStack; typedef struct my_stack_in_a原创 2021-11-03 21:36:53 · 155 阅读 · 0 评论 -
使用C语言实现的栈
使用链表实现 my_stack.h #ifndef MY_STACK_H #define MY_STACK_H #define elementType int struct node { elementType data; node *next; }; typedef struct node * Node; typedef Node Stack; void fatelError(const char * outprint); int isEmpty(Stack stack); void ma原创 2021-11-03 21:34:00 · 442 阅读 · 0 评论 -
基数排序算法实现
这个是《数据结构与算法C语言实现》的链表内容 radixSort.h #ifndef RADIX_SORT_H #define RADIX_SORT_H typedef struct node * Node; struct node { int num; Node next; }; typedef Node Head; void insert(const Head head, const Node newNode); void deleteNode(const Head head, Node原创 2021-10-31 13:17:09 · 270 阅读 · 0 评论 -
使用链表实现多项式相加和相乘
下面是《数据结构与算法分析C语言描述》中的40页练习 polynomialList.h #ifndef POLYNOMIAL_LIST_H #define POLYNOMIAL_LIST_H typedef struct node { int coefficient; int exponent; node * next; } * Node; typedef Node polynomial; void error(const char []); polynomial generatePoly原创 2021-10-23 21:29:54 · 212 阅读 · 0 评论 -
循环链表实现
下面是《数据结构与算法C语言实现》的循环链表实现 cycleList.h typedef int elementType; #ifndef CYCLE_LIST_H #define CYCLE_LIST_H struct node; typedef struct node * ptrToNode; typedef ptrToNode list; typedef ptrToNode position; list makeEmpty(list L); int isEmpty(list L); int i原创 2021-10-16 16:50:24 · 134 阅读 · 0 评论 -
单链表的实现2
list.h头文件 typedef int elementType; #ifndef LIST_H #define LIST_H struct node; typedef struct node * ptrToNode; typedef ptrToNode list; typedef ptrToNode position; list makeEmpty(list L); int isEmpty(list L); int isLast(list L, position P); position fin原创 2021-10-13 22:54:45 · 114 阅读 · 0 评论 -
数据结构与算法分析(C语言)的1.1节的代码实现
设有N个数,要确定其中第k个最大者,(我实现的是第k个最小者),也就是选择问题,C语言实现: #include<stdio.h> #include<stdlib.h> #include<assert.h> #define TOTAL_NUMBER 100000 #define KTH 50 //函数声明 void displayArray(int *data, int length, const char * preDisplay); /* * 产生指定数量的随机数原创 2020-11-29 23:28:47 · 193 阅读 · 0 评论