摘要:
#includeusing namespace std;#define MAXSIZE 10000class QElemType{public:int x,y;};class SQueue{public:int len;int front;//头指针,若队列不空,指向队列头元素int rear;//尾指针,若队列不空,指向队列尾元素的下一个位置QElemType base[MAXSIZE];int InitQueue();//初始化一个队伍int QueueLength();//求队伍长度int EnQueue(QElemType e);//插入元素为e的新的队尾元素int DeQueue(Q 阅读全文
摘要:
因为最近想做的一个东西和区间统计有关,心血来潮玩了下线段树。 #includeusing namespace std;#define MAXNUMBER 1leftIndex=0;treeRoot->rightIndex=this->cowNumber-1;//Compare the Left Child and Right Child resultFindTreeMinAndMaxValue(treeRoot);return;}void SegmentTree::FindTreeMinAndMaxValue(TreeNode *tNode){//See if the node e 阅读全文