C++
文章平均质量分 76
baidu_27372669
这个作者很懒,什么都没留下…
展开
-
c++用链表实现一元多项方程式
一元多项方程式的实现主要在于加减法。其主要有系数和指数,如果用顺序表来表示,最大指数如果很大比如1000,但是中间又有很多指数没有,所以会浪费很多空间,所以用链表来实现虽然麻烦但是节约空间,下面来看算法的实现 一:这是节点的结构体 #include using namespace std; struct Item { double coef; int expn; Item *原创 2015-05-17 10:04:16 · 762 阅读 · 0 评论 -
数据结构 基础排序算法
#include using namespace std; void out_print(int arr[],int len) { for(int i(0);i { cout } } void swap(int &i,int &j)//交换函数 { int k; k=j; j=i; i=k; } /*void Straigthinsertsort(int arr[]原创 2015-08-15 15:09:14 · 304 阅读 · 0 评论