随笔分类 -  数据结构-算法之类

摘要:C++ 代码 #include <stdlib.h> #include <stdio.h> #include <string.h> #include <assert.h> struct _ILinkNode; struct _ILink; struct _BPTreeNode; struct _BP 阅读全文
posted @ 2018-09-12 11:10 默默无语敲代码 阅读(320) 评论(0) 推荐(0)
摘要:#include <vector> #include <cstdio> using namespace std; class Heap { private : vector<int> data; void reBuildHead(); void reBuildTail(); public: Heap 阅读全文
posted @ 2017-08-25 14:53 默默无语敲代码 阅读(207) 评论(0) 推荐(0)
摘要:写的匆忙 估计有BUG 修改后 会去掉这个 说明 阅读全文
posted @ 2017-07-31 10:08 默默无语敲代码 阅读(178) 评论(0) 推荐(0)
摘要:/** * 为了 看了行出些 就不写树堆那样的 结构了。 虽然操作 方便些。 */public class AVLTree, Value> { private class Node { private final Key key; private Value val; private int height; priv... 阅读全文
posted @ 2017-07-31 10:04 默默无语敲代码 阅读(185) 评论(0) 推荐(0)
摘要:#include #include #include using namespace std; struct Node{ Node *ch[2]; int rank , value , size; const static int mod = 100; Node(int x){ value = x; rank = rand(... 阅读全文
posted @ 2017-01-22 11:42 默默无语敲代码 阅读(162) 评论(0) 推荐(0)
摘要:第一个 ,不得不说的 是 <冒泡排序> 作为 一个非常经典,又差劲的算法 。 计算过程如下: ->每次遍历数组,通过对比,使最大的冒上去, ->这样通过N次的轮循 ,可以使 排序的数组有序。 优点:简单,适用性强。 缺点:慢。 适用性:数组,链表. 性质:稳定性排序【打乱元素的稳定性,也就是 你不知 阅读全文
posted @ 2016-11-30 23:32 默默无语敲代码 阅读(297) 评论(0) 推荐(1)