算法实现(C++)
文章平均质量分 84
奔跑的少年
这个作者很懒,什么都没留下…
展开
-
进制转换
最近学到栈这块内容,自写了一个二进制转八进制的C++实现代码,最近代码写的太少,手有些生了,代码质量明显下降了~文件一 进制转换.cpp#include "stack.h"#include //二进制转八进制int _tmain(int argc, _TCHAR* argv[]){ Stack Binary;//创建二进制栈 char c='a';//用于接受二进制字符 c原创 2013-08-20 10:33:07 · 393 阅读 · 0 评论 -
约瑟夫问题
最近在学数据结构过程中再次遇到了这个问题,所以把代码又重新敲了一遍,问题还不少。#include #include #include using namespace std;typedef int DataType;class Node{public: Node(DataType str=1,Node *ptr=NULL) :data(str),next(ptr)原创 2013-08-18 10:40:50 · 392 阅读 · 0 评论