随笔分类 - 数据结构
摘要:#include #include #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 ElemType; typedef ...
阅读全文
摘要:#pragma once #include "stdafx.h" #include "Stack.h" //方法的声明实现的 分离写法 容易 报错,IDE还找不到错误的地方 //表达式求值 class Calculator { private: //Calculator's stack,运算存储区 Stack s; //7个方法 public: //建立一个空计算器栈 Calcula...
阅读全文
摘要:#pragma once #include "stdafx.h" #include "BinTreeNode.h" #include "Stack.h" //二叉树类BinTree的声明 template class BinTree { private: //指向根结点 BinTreeNode* root; //输入stop时,终止结点的输入 T stop; ...
阅读全文
摘要://链表表示的 一元多项式,无参构造器,有参构造器,相加,遍历#include #include #define OK 1 #define TRUE 1 #define ERROR -1 #define FALSE -1 #define OVERFLOW -2 typedef int Status; #define LEN sizeof(Node) #define MLC (Node*)ma...
阅读全文
摘要:#pragma once #include "stdafx.h" #define MAXK 1e7 //class AlgoMath { //public: // AlgoMath() {} // virtual ~AlgoMath() {} //}; //级数求和 //伪 lanmda 写法 //double Series=(double base, int limit, int Cons...
阅读全文
摘要://最大子列和 //动态规划 //算法4 在线处理,T(N)=O(N) //在线的意思是指每输入一个数据就进行即时处理,在任何一个地方中止输入,算法都能正确给出当前的解 int MaxSubsequSum4(int A[], int length) { int ThisSum, MaxSum; int i; ThisSum = MaxSum = 0; for (i = 0; i Max...
阅读全文
摘要:#pragma once #include "stdafx.h" //用vector实现矩阵, vector传参必须用模板泛型 template class Matrix { private: //2维的矩阵,2维的vector数组,vector就是一种动态数组 vector> array; public: //constructor(), 填充数组(行数) Matrix(int r...
阅读全文
摘要:1 using System; 2 using System.Collections; 3 using System.Collections.Generic; 4 using System.ComponentModel; 5 using System.Data; 6 using System.Dra
阅读全文
摘要:using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BitArrayCh.Algo { //BitArray 内置是逆序存储, 因此要自...
阅读全文
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Linq; 7
阅读全文
摘要://BitOperations.Designer.cs private System.Windows.Forms.Button btnAnd; private System.Windows.Forms.Button btnOr; private System.Windows.Forms.Button btnXor; private System.Windows.Forms.Label la...
阅读全文
摘要:using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace StackQueue.Main { //基数排序 public class ...
阅读全文
摘要:using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace StackQueue.algo { //进程优先队列 public stru...
阅读全文
摘要:#include #include #define OK 1 #define ERROR -1 #define TRUE 1 #define FALSE -1 #define NULL 0 #define OVERFLOW -2 #define ElemType int #define Status int typedef int ElemType typedef int Status #d...
阅读全文
摘要:#include #include #define OK 1 #define ERROR -1 #define TRUE 1 #define FALSE -1 #define NULL 0 #define OVERFLOW -2 #define ElemType int #define Status int typedef int ElemType typedef int Status #d...
阅读全文
摘要:#include #include #define OK 1 #define TRUE 1 #define ERROR -1 #define FALSE -1 #define OVERFLOW -2 #define ElemType int #define Status int typedef int ElemType typedef int Status #define MAX_SIZE ...
阅读全文
摘要:#include #include #define OK 1 #define ERROR -1 #define TRUE 1 #define FALSE -1 #define NULL 0 #define OVERFLOW -2 #define ElemType int #define Status int typedef int ElemType typedef int Status #d...
阅读全文
摘要:#include #include #define OK 1 #define TRUE 1 #define ERROR -1 #define FALSE -1 #define OVERFLOW -2 #define ElemType int #define Status int typedef int ElemType typedef int Status #define LEN sizeo...
阅读全文
摘要:#include #include #define OK 1 #define TRUE 1 #define ERROR -1 #define FALSE -1 #define OVERFLOW -2 #define ElemType int #define Status int //线性单链表 初始化 插入 取出 头插法 合并升序排列 //------------------------...
阅读全文

浙公网安备 33010602011771号