unordered_set操作总结

#构造函数 empty (1) explicit unordered_set ( size_type n = /* see below */, const hasher& hf = hasher(), const key_equal& eql = key_equal(), const allocator_type& alloc = allocator_type() ); explicit unordered_set ( const allocator_type& alloc ); range (2) template <class InputIterator> unordered_set ( InputIterator first, InputIterator last, size_type n = /* see below */, const hasher& hf = hasher(), const key_equal& eql = key_equal(), const allocator_type&

set和multiset操作总结

set 构造函数 empty (1) explicit set (const key_compare& comp = key_compare(), const allocator_type& alloc = allocator_type()); explicit set (const allocator_type& alloc); range (2) template <class InputIterator> set (InputIterator first, InputIterator last, const key_compare& comp = key_compare(), const allocator_type& = allocator_type()); copy (3) set (const set& x); set (const set& x, const allocator_type& alloc); move (4) set (set&& x); set (set&& x, const allocator_type& alloc); initializer list (5)

map和multimap操作总结

map 构造函数 empty (1) explicit map (const key_compare& comp = key_compare(), const allocator_type& alloc = allocator_type()); explicit map (const allocator_type& alloc); range (2) template <class InputIterator> map (InputIterator first, InputIterator last, const key_compare& comp = key_compare(), const allocator_type& = allocator_type()); copy (3) map (const map& x); map (const map& x, const allocator_type& alloc); move (4) map (map&& x); map (map&& x, const allocator_type& alloc); initializer list (5)

stack,queue,priority_queue操作总结

stack queue priority_queue priority_queue 对于基本类型的使用方法相对简单。他的模板声明带有三个参数: priority_queue<Type, Container, Functional> 其中Type 为数据类型, Container 为保存数据的容器,Functional 为元

forward_list操作总结

构造函数 default (1) explicit forward_list (const allocator_type& alloc = allocator_type()); fill (2) explicit forward_list (size_type n); explicit forward_list (size_type n, const value_type& val, const allocator_type& alloc = allocator_type()); range (3) template <class InputIterator> forward_list (InputIterator first, InputIterator last, const allocator_type& alloc = allocator_type()); copy (4) forward_list (const forward_list& fwdlst); forward_list (const forward_list& fwdlst, const allocator_type& alloc); move (5) forward_list (forward_list&& fwdlst); forward_list (forward_list&& fwdlst, const allocator_type& alloc);

deque操作总结

deque操作和vector操作基本相同 构造函数 default (1) explicit deque (const allocator_type& alloc = allocator_type()); fill (2) explicit deque (size_type n); deque (size_type n, const value_type& val, const allocator_type& alloc = allocator_type()); range (3) template <class InputIterator> deque (InputIterator first, InputIterator last, const allocator_type& alloc = allocator_type()); copy (4) deque (const deque&

list操作总结

构造函数 default (1) explicit list (const allocator_type& alloc = allocator_type()); fill (2) explicit list (size_type n); list (size_type n, const value_type& val, const allocator_type& alloc = allocator_type()); range (3) template <class InputIterator> list (InputIterator first, InputIterator last, const allocator_type& alloc = allocator_type()); copy (4) list (const list& x); list (const list& x, const allocator_type& alloc); move (5) list (list&& x); list (list&& x, const allocator_type& alloc); initializer

vector操作总结

vector容器的相关操作和string非常相似. 构造函数 default (1) explicit vector (const allocator_type& alloc = allocator_type()); fill (2) explicit vector (size_type n); vector (size_type n, const value_type& val, const allocator_type& alloc = allocator_type()); range (3) template <class InputIterator> vector (InputIterator first, InputIterator last, const allocator_type& alloc = allocator_type());

reverse_iterator的用法

基本区别 调用reverse_iterator的base()成员函数可以得到“与之相对应的”iterator,但是这句话实际上并没有说明真正的

流对象为什么可以作为条件表达式?

转载: http://blog.csdn.net/bladelyer/article/details/8505912. http://blog.csdn.net/andyelvis/article/details/4529592 原理解释 相信很多人都遇到过这样的例子: 1 2 3 string str; while( cin >> str ) cout << str << flush; 似乎,大多数初学者都不明白【cin » str】怎么可以作为whi

KMP算法详解

算法目标 kmp算法完成的任务是:给定两个字符串O和f,长度分别为n和m,判断f是否在O中出现,如果出现则返回出现的位置。常规方法是遍历a的每

八大经典排序算法

八大排序算法总结 排序算法稳定性 假定在待排序的记录序列中,存在多个具有相同的关键字的记录,若经过排序,这些记录的相对次序保持不变,即在原序列中

二叉树的类型

二叉树的定义 二叉树是每个节点最多有两个子树的树结构。它有五种基本形态:二叉树可以是空集;根可以有空的左子树或右子树;或者左、右子树皆为空。 二

位图排序

计数排序与位图排序 计数排序(Counting sort)是一种稳定的线性时间排序算法。计数排序使用一个额外的数组C,其中第i个元素是待排序数组

AVL树详解

转载: http://www.cnblogs.com/QG-whz/p/5167238.html. http://blog.csdn.net/sp_programmer/article/details/41812787. 定义 AVL树又称为高度平衡的二叉搜索树。它能保持二叉树的高度平衡,尽量降低二叉树的高度,减少树的平均搜索长度。 性质 AVL树本质上还

红黑树详解

转载: http://www.cnblogs.com/skywang12345/p/3245399.html http://blog.csdn.net/v_july_v/article/details/6105630 简介 红黑树并不追求“完全平衡”——它只要求部分地达到平衡要求,降低了对旋转的要求,从而提高了性能。 红黑树能够以O(lgn) 的时间复

HTTP各版本的区别

HTTP简介 HTTP协议,即超文本传输协议(Hypertext transfer protlcol)。是一种详细规定了万维网服务器之间通讯的规则,通过因特尔传