![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C/C++
文章平均质量分 76
Ragnarok
这个作者很懒,什么都没留下…
展开
-
C++实现split函数(来自网上)
vector split(string source, string sep) { vector result; int sepLen = sep.length(); int lastPosition = 0; int index = -1; while (转载 2011-09-15 15:40:30 · 380 阅读 · 0 评论 -
数据结构作业—Calendar
感觉写得有点别扭.... 万年历...写得不好见谅哈 calendar.cpp: /** * File calendar.cpp, 2011.09.15 * define class Calendar * Copyright by Zhou Junjie, 2011~原创 2011-09-17 14:09:03 · 643 阅读 · 0 评论 -
g++编译链接多个文件
头文件 mystack.h /** * File mystack.h * Declare class Stack **/ #ifndef MYSTACK_H #define MYSTACK_H #include using namespace std; enum E原创 2011-09-18 16:37:24 · 1324 阅读 · 0 评论 -
数据结构作业—表达式求值
嘛...就是转换成反波兰式嘛...... #include #include #include #include #include #include using namespace std; string changeToReversePolish(string原创 2011-10-17 11:56:32 · 690 阅读 · 0 评论 -
sicily 1424 奖金..
现在这么水机试肿么办啊啊啊啊啊 #include #include #include #include using namespace std; const int MAX = 10050; vector graph[MAX]; int inDegree[MAX]; queue zeroVertex; int money[MAX]; // 最低工资的排在前面... void原创 2012-01-07 01:08:14 · 1018 阅读 · 0 评论 -
Mark 一个类...一个很简单的二叉查找树...
#ifndef BINARYSEARCHTREE_H_INCLUDED #define BINARYSEARCHTREE_H_INCLUDED /** * File BinarySearchTree.h * the Header file of binary search tree **/ #include #include using namespac原创 2012-01-02 16:46:28 · 388 阅读 · 0 评论 -
非递归遍历二叉树
1.先序遍历 从递归说起 void preOrder(TNode* root){ if (root != NULL) { Visit(root); preOrder(root->left); preOrder(root->right); }} 递归算法非常的简单。先访问跟节点,然后访问左节点,再访问右节点。如果不用递归,转载 2012-01-01 23:45:38 · 361 阅读 · 0 评论 -
饿...Course中的某题...DAG
由于涉及了一个比较常用的算法,用拓扑排序判断一个有向图是否无环,因此mark下来 #include #include #include #include using namespace std; const int MAX = 1000; bool graph[MAX][MAX]; bool visited[MAX]; int inDegree[MAX]; bool ifRing原创 2012-01-04 10:34:32 · 413 阅读 · 0 评论