
数据结构
吴安
大漠孤烟直,长河落日圆。 C++ C# Halcon openCV
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
自己写的链表模板类
#include using namespace std;template class Node{public: Node() { m_header=NULL; m_pNext=NULL; } void CreateList(T newNodeCuntter); int GetListSize(); void AddToTail( T newNodeCuntt原创 2016-10-21 17:28:46 · 468 阅读 · 0 评论 -
C++ Template List(part)
#include using namespace std;template class mynode{public: T m_obj; mynode * m_next;}; template class myList{public: myList() { m_header=NULL; } void create( T val); void addtotail原创 2016-10-21 18:45:48 · 423 阅读 · 0 评论 -
二叉数的遍历
1#include stdio.h> 2#include stdarg.h> 3 4#ifndef bool 5#define bool unsigned int 6#define false 0 7#define true 1 8#endif 9 10#ifndef NULL 11#define NULL 0 12#e转载 2016-10-12 12:34:26 · 285 阅读 · 0 评论 -
数据结构 考研题
#include using namespace std;#include "stdlib.h"struct strNode{ char m_char; strNode *next;};class strClassList{public: strClassList() { m_isize=0; phead=NULL; } ~strClassList()原创 2016-12-21 12:26:45 · 586 阅读 · 0 评论 -
循环单链表
#includeusing namespace std;#include "stdlib.h"template class node{public: node() { m_next=NULL; } TypeName m_node; node * m_next;protected:private: };template class CircleList{原创 2016-12-23 17:44:45 · 314 阅读 · 0 评论 -
约瑟夫问题 循环单链表解法
m_prear 是指向单链表的尾部的指针。m_prear ->m_next 是指向头指针。 函数YSF就是对约瑟夫问题的求解方法函数。#includeusing namespace std;#include "stdlib.h"#define N 13template class node{public: node() { m_next=NULL; } ~no原创 2016-12-24 16:26:11 · 395 阅读 · 0 评论 -
约瑟夫问题
约瑟夫环问题。13 个人围成一圈,从第1 个人开始报数,报到“3”退出圈子,按顺序输出退出圈子的序号。#include using namespace std;#include "stdlib.h"//13个人 退出的人对应的数组为标记为1 ,没有突出的标记为0int a[13]={0};int b[13]={0};//接收的退出顺序的数组。int n=13;#原创 2016-12-20 11:40:24 · 272 阅读 · 0 评论 -
泛型链表的反转
#include<iostream>#include "stdlib.h"using namespace std;template<typename T>class mylist{private: struct node { T data; node* m_next; node() { m_next=NULL; } };pub...原创 2018-10-07 17:24:47 · 182 阅读 · 0 评论 -
链表 环形链表 队列 环形队列 栈
#include<iostream>#include "stdlib.h"#define _AFXDLL#include "windows.h"#include "process.h"#define SelTest 2using namespace std;template<typename T>class mylist{private: stru...原创 2018-10-10 23:56:41 · 551 阅读 · 0 评论