1, 最大子序列和问题(四种解法) class Test 2, 高效率的取幂运算 class Test 3,一元多项式运算(链表表示) #include<stdio.h>#include<malloc.h>#include<stdlib.h>#define LEN sizeof(node) typedef struct polynode 另一个示例: //File: ListOper.h#ifndef DATASTRUCT#define DATASTRUCT#include "datastruct.h"#endif//some functions declaretioinbool CreateList(LinkList &L);Node *CreateNode(int e, int c);void FreeList(LinkList &L);void SortList(LinkList &L);void DeleteNextNode(Node *d);void SweepNextNode(Node *s);void OutPutList(LinkList &L);相关函数的实现,对应文件ListOper.cpp://File: ListOper.cpp#include <stdlib.h>#include <iostream>#ifndef DATASTRUCT#define DATASTRUCT#include "datastruct.h"#endif#include "ListOper.h"using namespace std;bool CreateList(LinkList &L) 4, 中缀表达式转换为后缀表达式 #include<iostream.h>const int MAX=40; 相关文章: 2021-12-05 2021-11-17 2021-07-23 2021-04-08 2021-12-07 2022-12-23 2023-04-03 2021-04-13