![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
一位不想透露名字的路人甲
你想知道啥?
展开
-
中缀表达式转为后缀表达式
zhong2hou.h/** * 这个程序是中缀表达式到后缀表达式的转换 * 使用栈的数据结构开实现 */#ifndef ZHONG2HOU_H#define ZHONG2HOU_H#define elementType charstruct my_stack_in_array{ int capacity; int topOfStack; elementType *Array; };typedef struct my_stack_in_array myStack;原创 2021-11-07 18:18:40 · 123 阅读 · 0 评论 -
使用数组表实现的栈
my_stack_in_array.h#ifndef MY_STACK_IN_ARRAY#define MY_STACK_IN_ARRAY#define elementType intstruct 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 · 110 阅读 · 0 评论 -
使用C语言实现的栈
使用链表实现my_stack.h#ifndef MY_STACK_H#define MY_STACK_H#define elementType intstruct 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 · 392 阅读 · 0 评论 -
基数排序算法实现
这个是《数据结构与算法C语言实现》的链表内容radixSort.h#ifndef RADIX_SORT_H#define RADIX_SORT_Htypedef 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 · 227 阅读 · 0 评论 -
使用链表实现多项式相加和相乘
下面是《数据结构与算法分析C语言描述》中的40页练习polynomialList.h#ifndef POLYNOMIAL_LIST_H#define POLYNOMIAL_LIST_Htypedef struct node{ int coefficient; int exponent; node * next;} * Node;typedef Node polynomial;void error(const char []);polynomial generatePoly原创 2021-10-23 21:29:54 · 151 阅读 · 0 评论 -
循环链表实现
下面是《数据结构与算法C语言实现》的循环链表实现cycleList.htypedef int elementType;#ifndef CYCLE_LIST_H#define CYCLE_LIST_Hstruct 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 · 84 阅读 · 0 评论 -
单链表的实现2
list.h头文件typedef int elementType;#ifndef LIST_H#define LIST_Hstruct 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 · 69 阅读 · 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 · 140 阅读 · 0 评论