随笔分类 -  数据结构

数据结构-各种排序算法
摘要:实现: 1 #ifndef SORT_H 2 #define SORT_H 3 4 /** 5 * Several sorting routines. 6 * Arrays are rearranged with smallest item first. 7 */ 8 9... 阅读全文

posted @ 2014-08-06 08:22 醉清风JM 阅读(288) 评论(0) 推荐(0)

数据结构-二项队列
摘要:实现: 1 #ifndef BINOMIAL_QUEUE_H 2 #define BINOMIAL_QUEUE_H 3 4 #include 5 #include 6 #include "dsexceptions.h" 7 using namespace std; 8 9 ... 阅读全文

posted @ 2014-08-04 22:54 醉清风JM 阅读(238) 评论(0) 推荐(0)

数据结构-左式堆
摘要:复杂度:实现: 1 #ifndef LEFTIST_HEAP_H 2 #define LEFTIST_HEAP_H 3 4 #include "dsexceptions.h" 5 #include 6 using namespace std; 7 8 // Leftist he... 阅读全文

posted @ 2014-07-31 08:02 醉清风JM 阅读(204) 评论(0) 推荐(0)

数据结构-二叉堆
摘要:实现:#ifndef BINARY_HEAP_H#define BINARY_HEAP_H#include "dsexceptions.h"#include using namespace std;// BinaryHeap class//// CONSTRUCTION: with an optio... 阅读全文

posted @ 2014-07-29 12:35 醉清风JM 阅读(220) 评论(0) 推荐(0)

数据结构-Hash表
摘要:实现: 1 #ifndef SEPARATE_CHAINING_H 2 #define SEPARATE_CHAINING_H 3 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 ... 阅读全文

posted @ 2014-07-26 23:10 醉清风JM 阅读(274) 评论(0) 推荐(0)

数据结构-Stack和Queue
摘要:实现: 1 #include "c2_list.h" 2 3 template 4 class Stack{ 5 public: 6 bool isEmpty() const 7 {return _list.empty();} 8 9 const object& top... 阅读全文

posted @ 2014-07-26 23:08 醉清风JM 阅读(221) 评论(0) 推荐(0)

数据结构-AVL树的旋转
摘要:http://blog.csdn.net/GabrieL1026/article/details/6311339平衡二叉树在进行插入操作的时候可能出现不平衡的情况,AVL树即是一种自平衡的二叉树,它通过旋转不平衡的节点来使二叉树重新保持平衡,并且查找、插入和删除操作在平均和最坏情况下时间复杂度都是O... 阅读全文

posted @ 2014-07-24 12:57 醉清风JM 阅读(1291) 评论(0) 推荐(0)

数据结构-AVL树
摘要:实现: 1 #ifndef AVL_TREE_H 2 #define AVL_TREE_H 3 4 #include "dsexceptions.h" 5 #include // For NULL 6 using namespace std; 7 8 // AvlTree... 阅读全文

posted @ 2014-07-24 07:28 醉清风JM 阅读(203) 评论(0) 推荐(0)

数据结构-二叉搜索树
摘要:实现: 1 #ifndef BINARY_SEARCH_TREE_H 2 #define BINARY_SEARCH_TREE_H 3 4 #include "dsexceptions.h" 5 #include // For NULL 6 using namespace st... 阅读全文

posted @ 2014-07-24 07:23 醉清风JM 阅读(221) 评论(0) 推荐(0)

数据结构-List
摘要:Lis的实现://///////////////////////////////////////////////////////////////////////////////// FileName : c2_list.h// Author : Jimmy Han// ... 阅读全文

posted @ 2014-07-06 22:52 醉清风JM 阅读(192) 评论(0) 推荐(0)

数据结构-Vector
摘要:自定义Vector实现://///////////////////////////////////////////////////////////////////////////////// FileName : c2_vector.h// Author : Jimmy ... 阅读全文

posted @ 2014-07-05 16:22 醉清风JM 阅读(289) 评论(0) 推荐(0)

数据结构-二分查找
摘要:1 #include 2 #include 3 #include 4 #include "example_vec.h" 5 #include "printCollection.h" 6 using namespace std; 7 8 extern vector example_vec; ... 阅读全文

posted @ 2014-07-05 15:39 醉清风JM 阅读(247) 评论(0) 推荐(0)

数据结构-汉诺塔
摘要:1 /////////////////////////////////////////////////////////////////////////////// 2 // 3 // FileName : hanoi.c 4 // Version : 0.10 5 // Author : Ryan Han 6 // Date : 2013/07/01 10:55:30 7 // Comment : 8 // 9 /////////////////////////////////////////////////////... 阅读全文

posted @ 2013-07-01 12:58 醉清风JM 阅读(246) 评论(0) 推荐(0)

#数据结构-fib
摘要:1 /////////////////////////////////////////////////////////////////////////////// 2 // 3 // FileName : fic.c? 4 // Version : 0.10 5 // ... 阅读全文

posted @ 2013-07-01 10:25 醉清风JM 阅读(253) 评论(0) 推荐(0)

数据结构-阶乘
摘要:1 /////////////////////////////////////////////////////////////////////////////// 2 // 3 // FileName : factorial.c? 4 // Version : 0.10 5 // Author : Ryan Han 6 // Date : 2013/07/01 10:12:30 7 // Comment : 8 // 9 ////////////////////////////////////////////////... 阅读全文

posted @ 2013-07-01 10:14 醉清风JM 阅读(305) 评论(0) 推荐(0)

数据结构-循环列表
摘要:1 /////////////////////////////////////////////////////////////////////////////// 2 // 3 // FileName : clist.h 4 // Version : 0.10 5 // Author : Ryan Han 6 // Date : 2013/06/25 10:05:10 7 // Comment : 8 // 9 ////////////////////////////////////////////... 阅读全文

posted @ 2013-06-27 12:49 醉清风JM 阅读(305) 评论(0) 推荐(0)

数据结构-bubble sort
摘要:#gcc version 4.5.3 (GCC)#include #include template void bubble_sort(ARRAY_TYPE array[], INDEX_TYPE size){ bool done = false; while(!done) { done = t... 阅读全文

posted @ 2013-06-19 16:43 醉清风JM 阅读(263) 评论(0) 推荐(0)

数据结构-快速排序
摘要:// Header.h//定义函数指针别名typedef int ( *PFI2S ) ( const string &, const string & );//函数声明int lexicoCompare( cnost string &, const string & );int sort( str... 阅读全文

posted @ 2013-03-27 23:55 醉清风JM 阅读(177) 评论(0) 推荐(0)

数据结构-书籍列表
摘要:Data structures with Abstract Data Types, Daniel F.Stubb and Neil W.Webbre著,第二版,Pacific Grove, CA, Brooks/Colde, 1989长期-记忆力长期-逻辑思维能力 阅读全文

posted @ 2013-03-20 22:29 醉清风JM

导航