转载自http://blog.csdn.net/jackie03/article/details/7312481 一,java中各种集合的关系图 Collection 接口的接口 对象的集合 ├ List 子接口 按进入先后有序保存 可重复 │├ LinkedList 接口实现类 链表 插入删除 没 ...
分类:
编程语言 时间:
2017-02-26 22:17:08
阅读次数:
280
#include #include #define OK 1 #define ERROR -1 #define TRUE 1 #define FALSE -1 #define NULL 0 #define OVERFLOW -2 #define ElemType int #define Status... ...
分类:
其他好文 时间:
2017-02-24 23:50:13
阅读次数:
232
#include #include #define OK 1 #define TRUE 1 #define ERROR -1 #define FALSE -1 #define OVERFLOW -2 #define ElemType int #define Status int typedef in... ...
分类:
其他好文 时间:
2017-02-24 23:43:59
阅读次数:
235
#include #include #define OK 1 #define TRUE 1 #define ERROR -1 #define FALSE -1 #define OVERFLOW -2 #define ElemType int #define Status int typedef in... ...
分类:
其他好文 时间:
2017-02-24 23:41:03
阅读次数:
254
#include #include #define OK 1 #define ERROR -1 #define TRUE 1 #define FALSE -1 #define NULL 0 #define OVERFLOW -2 #define ElemType int #define Status... ...
分类:
其他好文 时间:
2017-02-24 23:35:09
阅读次数:
351
c++ stl集合set介绍 c++ stl集合(Set)是一种包含已排序对象的关联容器。 set/multiset会根据待定的排序准则,自动将元素排序。两者不同在于前者不允许元素重复,而后者允许。 声明:本文转载:http://www.cnblogs.com/zyxStar/p/4542835.h ...
分类:
其他好文 时间:
2017-02-19 17:12:20
阅读次数:
185
一 二分查找 二分查找又称折半查找,优点是比较次数少,查找速度快,平均性能好;其缺点是要求待查表为有序表,且插入删除困难。因此,折半查找方法适用于不经常变动而查找频繁的有序列表。首先,假设表中元素是按升序排列,将表中间位置记录的关键字与查找关键字比较,如果两者相等,则查找成功;否则利用中间位置记录将 ...
分类:
编程语言 时间:
2017-02-19 15:32:09
阅读次数:
175
关于红黑树和AVL树,来自网络: 1 好处 及 用途 红黑树 并不追求“完全平衡 ”——它只要求部分地达到平衡要求,降低了对旋转的要求,从而提高了性能。 红黑树能够以 O(log2 n) 的时间复杂度进行搜索、插入、删除操作。此外,由于它的设计,任何不平衡都会在三次旋转之内解决。当然,还有一些更好的 ...
分类:
其他好文 时间:
2017-02-17 23:11:47
阅读次数:
627
题目链接:http://poj.org/problem?id=2823 用RMQ超时了,我想应该是不会的,看discuss说,之前RMQ过了。 维护两个单调队列。 单调递减的队列,每插入一个时: 超过单调队列长度,左移头指针。 第一个或者符合条件,直接加到后面。 否则,一直退; 题目链接:http: ...
分类:
其他好文 时间:
2017-02-16 01:39:56
阅读次数:
231
○?○?○?○?NULL 这里先不关注怎么实现,而是考察一下链表有多少种操作的可能。基本操作:创建,插入,删除,遍历,合并...等等 ...
分类:
其他好文 时间:
2017-02-12 10:49:16
阅读次数:
163