随笔分类 - 数据结构-算法之类
摘要:C++ 代码 #include <stdlib.h> #include <stdio.h> #include <string.h> #include <assert.h> struct _ILinkNode; struct _ILink; struct _BPTreeNode; struct _BP
阅读全文
摘要:#include <vector> #include <cstdio> using namespace std; class Heap { private : vector<int> data; void reBuildHead(); void reBuildTail(); public: Heap
阅读全文
摘要:/** * 为了 看了行出些 就不写树堆那样的 结构了。 虽然操作 方便些。 */public class AVLTree, Value> { private class Node { private final Key key; private Value val; private int height; priv...
阅读全文
摘要:#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(...
阅读全文
摘要:第一个 ,不得不说的 是 <冒泡排序> 作为 一个非常经典,又差劲的算法 。 计算过程如下: ->每次遍历数组,通过对比,使最大的冒上去, ->这样通过N次的轮循 ,可以使 排序的数组有序。 优点:简单,适用性强。 缺点:慢。 适用性:数组,链表. 性质:稳定性排序【打乱元素的稳定性,也就是 你不知
阅读全文

浙公网安备 33010602011771号