数据结构
帅气的东哥
这个作者很懒,什么都没留下…
展开
-
队列的数组实现
/* * queue_2.cpp * * Created on: 2013年8月2日 * Author: 黄东东 * 为了能有章泽天这样的女朋友而不断努力。。。。。 * fighting。。。。。。。 */#include typedef int T;using namespace std;class Queue { int a[5];原创 2013-08-02 19:56:43 · 1150 阅读 · 0 评论 -
栈的链表实现
1)list.h/* * list_2.cpp * * Created on: 2013年8月2日 * Author: 黄东东 * 为了能有章泽天这样的女朋友而不断努力。。。。。。 */#include using namespace std;typedef int T;class List { struct Node { T data原创 2013-08-02 16:14:30 · 1169 阅读 · 0 评论 -
栈的数组实现
/* * stack_1.cpp * * Created on: 2013年8月2日 * Author: 黄东东 * 为能有章泽天这样的女朋友而不断努力......... */#include using namespace std;typedef int T;class Stack{ T a[5]; int cur;public: St原创 2013-08-02 15:34:55 · 1156 阅读 · 0 评论 -
二叉排序树的实现
/* * bst.cpp * * Created on: 2013年8月3日 * Author: 黄俊东 * 加油,努力就会有机会。总有一天我会有章泽天那样的女朋友的。。。。。。 */#include using namespace std;typedef char T;class bst{ struct Node{ T data; Nod原创 2013-08-03 19:25:51 · 1483 阅读 · 0 评论 -
几种常见的排序算法
1、冒泡排序算法描述:代码实现:void bubble_sort(int* a ,int n){ bool changed; do{ changed = false; for(int i = 1 ; i < n ; ++i){ if(a[i] < a[i-1]){ swap(a[i],a[i-1]); changed = true;原创 2013-08-04 11:10:55 · 1407 阅读 · 0 评论 -
队列的链表实现
/* * queue_3.cpp * * Created on: 2013年8月2日 * Author: 黄俊东 * 目标章泽天。。。加油。。。。。 * */#include #include "list_2.h"using namespace std;typedef int T;class Queue { List l;public: Q原创 2013-08-03 16:50:28 · 1224 阅读 · 0 评论 -
二分查找的两种方式
/* * query.cpp * * Created on: 2013年8月4日 * Author: Administrator */#include using namespace std;class Person{ string name; int age; string salary;public: Person(string name , i原创 2013-08-04 13:55:38 · 1606 阅读 · 0 评论