C++
blacop
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
线性表 初始化 插入 删除 的操作
#include <stdio.h> #include <stdlib.h>#define LEN sizeof(ElemType)#define OK 1 #define TRUE 1 #define ERROR -1 #define FALSE -1 #define OVERFLOW -2typedef int ElemType typedef int Status const LIST_INI原创 2017-02-21 23:07:09 · 4062 阅读 · 0 评论 -
用vector实现矩阵, vector传参必须用模板泛型
#pragma once #include "stdafx.h"//用vector实现矩阵, vector传参必须用模板泛型 template <typename Object> class Matrix { private: //2维的矩阵,2维的vector数组,vector就是一种动态数组 vector<vector<Object>> array; public: //原创 2017-03-22 23:10:43 · 894 阅读 · 0 评论 -
最大子列和 动态规划 在线处理
//最大子列和 动态规划 在线处理 //动态规划 //算法4 在线处理,T(N)=O(N) //在线的意思是指每输入一个数据就进行即时处理,在任何一个地方中止输入,算法都能正确给出当前的解 int MaxSubsequSum4(int A[], int length) { int ThisSum, MaxSum; int i; ThisSum = MaxSum = 0;原创 2017-03-22 23:13:34 · 990 阅读 · 0 评论 -
级数求和 C# lanmda写法
#pragma once #include "stdafx.h" #define MAXK 1e7 //class AlgoMath { //public: // AlgoMath() {} // virtual ~AlgoMath() {} //};//级数求和 //伪 lanmda 写法 //double Series=(double base, int limit, int Consta原创 2017-03-22 23:18:10 · 1166 阅读 · 0 评论 -
表达式求值
#pragma once #include "stdafx.h" #include "Stack.h" //方法的声明实现的 分离写法 容易 报错,IDE还找不到错误的地方//表达式求值 class Calculator { private: //Calculator's stack,运算存储区 Stack<double> s; //7个方法 public: //建立原创 2017-04-01 16:19:37 · 442 阅读 · 0 评论 -
链式栈的类定义
#pragma once #include "stdafx.h" #include "StackNode.h"//LinkStack,链式栈的类定义 template <typename T> class Stack { private: StackNode<T>* top; //cur ptr // 7个方法 public: //Construct Function()原创 2017-04-01 16:21:42 · 1606 阅读 · 0 评论 -
线性单链表的操作
#include <stdio.h> #include <stdlib.h> #define OK 1 #define ERROR 0 #define TRUE 1 #define FALSE 0 #define INFEASIBLE -1 #define OVERFLOW -2 /* #define ElemType int #define Status int */ typedef int E原创 2017-04-01 16:25:43 · 837 阅读 · 0 评论 -
二叉树类BinTree的声明
#pragma once #include "stdafx.h" #include "BinTreeNode.h" #include "Stack.h" //二叉树类BinTree的声明 template <typename T> class BinTree { private: //指向根结点 BinTreeNode<T>* root; //输入stop时,终止结点的输入原创 2017-03-27 00:25:54 · 1977 阅读 · 0 评论
分享