补充一个多线程场景下常使用的工具-Queue。 第一步:__init__() 1 class Queue: 2 3 def __init__(self, maxsize=0): 4 self.maxsize = maxsize 5 self._init(maxsize) 6 7 # mutex mu ...
分类:
其他好文 时间:
2020-04-30 21:23:06
阅读次数:
56
1.这一章主要学习了栈和队列的一些基本操作。(1)栈(LIFO)分为顺序栈和链栈,遵循先进后出的原则。顺序栈的一些基本操作: typedef struct { SElemType data[MAXSIZE]; int top;//标记栈顶 int stacksize;//标记栈的最大容量 }SqSt ...
分类:
其他好文 时间:
2020-04-26 18:51:07
阅读次数:
128
package arithmetic; import java.util.ArrayList; import java.util.Arrays; /** * @author hailu */ public class SelectionSort { public static void select ...
分类:
编程语言 时间:
2020-04-25 13:04:40
阅读次数:
68
create tablespace test datafile 'D:\ytzz\Oracle\oracledata\test.DBF' size 4500M autoextend on next 100M maxsize unlimited; drop user test cascade;/cre ...
分类:
其他好文 时间:
2020-04-20 13:57:23
阅读次数:
75
以下是组件代码,重点部分在watch中, <!-- 传参 :mutileUploadData={ defaultList:Array,初始图片 format:Array,['jpg','jpeg','png'], actionUrl:// 必填_接口地址 maxSize:'1024'//最大尺寸 m ...
分类:
Web程序 时间:
2020-04-17 20:02:28
阅读次数:
205
#include <iostream> #include <fstream> #include <string> using namespace std; #define MAXSIZE 101 #define COMMIT typedef struct ArcNode { int adjvex = ...
分类:
其他好文 时间:
2020-04-17 15:38:34
阅读次数:
56
栈的用途比较广 如:子进程调用,递归调用,表达式转换,二叉树遍历,深度优先搜索 等等 实现思路: 1)top=-1时栈为空,top=maxsize-1栈满 C#代码实现: 1 using System; 2 3 namespace 数据结构 4 { 5 public class ArrayStack ...
分类:
编程语言 时间:
2020-04-16 09:18:27
阅读次数:
73
1 //双亲储存结构 2 typedef struct{ 3 ElemType data; 4 int parent; 5 }PTree[MaxSize]; 6 7 //孩子链储存结构 8 const int MaxSons = 10; 9 typedef struct node{ 10 ElemT ...
分类:
编程语言 时间:
2020-04-15 21:28:03
阅读次数:
104
1 //最小代价生成树 2 //prim算法(稠密图):从与这棵树相连的边中选择最短的边,并将这条边及其所连顶点接入当前树中 3 void Prim(MGraph g,int v0,int &sum) { 4 int lowcost[maxsize],visit[maxsize],v;//lowco ...
分类:
其他好文 时间:
2020-04-14 14:07:16
阅读次数:
105
实现思路: 1)front=-1指向队列头前一位置,rear=-1指向队列尾,maxSize初始化队列最大容量 2)当rear<maxSize-1 表示队列还未满,允许继续在队列末尾添加rear++; 3)当front==rear表示队列为空 C#实现代码: using System; namesp ...
分类:
编程语言 时间:
2020-04-11 09:29:59
阅读次数:
64