- 博客(8)
- 资源 (1)
- 问答 (1)
- 收藏
- 关注
原创 [数据结构]N-Queens Problem(recursion)
//queens.h#pragma onceconst int maxboard = 30;class Queens{public: Queens(int size); bool is_solved()const; void print(); bool ungarded(int col)const;//优化后 void insert(int col); void remove
2016-03-30 18:31:53 642
原创 [数据结构]Stack_Calculator(中序波兰式转后序波兰式)
//Stack_Calculator.h#pragma onceconst int maxlength = 100;class Calculator{public: Calculator(); void transform(); void calc();private: int number_count; char Reverse_Polish[maxlength];};
2016-03-30 18:28:56 677
原创 [数据结构]双链表模拟网站前进后退
//web_site.h#pragma onceenum Error_code{success,underflow,overflow};templateclass Webset{public: Webset(); ~Webset(); Error_code insert(const Node_entry &item); Error_code back(); Error_cod
2016-03-30 18:26:56 608
原创 [数据结构]Polynomial
//Term.h#pragma onceclass Term{public: Term(); int exp; double coe; Term(int exp, double coe);};//Term.cpp#include"Term.h"#includeusing namespace std;Term::Term() { exp = 0; coe = 0
2016-03-30 18:24:57 2315
原创 [数据结构]Joseph problem(模拟)
#includeusing namespace std;struct Node{ Node(); Node(int item, Node *add_on = NULL); Node *next; int entry;};Node::Node(){ next = NULL;}Node::Node(int item, Node * add_on){ entry = i
2016-03-30 18:18:21 383
原创 [数据结构]Linked_stack
//Link_Stack.h#pragma onceenum Error_code{success,underflow,overflow};templateclass Linked_Stack{public: Linked_Stack(); bool empty()const; Error_code pop(); Error_code top(Stack_entry &item
2016-03-30 18:17:18 298
原创 [数据结构]Linked_queue
//LInked_queue.h#pragma onceenum Error_code { success, overflow, underflow };templateclass Linked_queue{public: Linked_queue(); ~Linked_queue(); Error_code append(const Queue_entry &item); E
2016-03-30 18:11:14 375
原创 [数据结构]Stack(数组)实现
//my_stack.cpp#include"MyStack.h"#includeusing namespace std;templateMyStack::MyStack(){ count = 0;}templateError_Code MyStack::pop(){ if (count == 0)return underflow; else count--; re
2016-03-01 12:40:09 570
strcpy的实现问题。。。。
2016-01-02
TA创建的收藏夹 TA关注的收藏夹
TA关注的人