Skip to content
AstroM edited this page May 25, 2017 · 4 revisions

头文件:#include<vector>
声明:vector<int> v; vector<vector<int> > v(size1+1, vector<int>(size2+1),0);
数组转换成vector:int arr[] = {1,2,3,4,5}; vector<int> vec(arr, arr+5);
将元素插入尾端:v.push_back();
将尾端元素删除:v.pop_back();
排序:sort (myvector.begin(), myvector.begin()+4);

STL
  标准STL序列容器
  * vector
  * string
  * deque
  * list
  标准STL Associative Container
  * set
  * multiset
  * map
  * multimap
  非标准关联容器
  * hash_set
  * hash_multiset
  * hash_map
  * hash_multimap
  * unordered_set
  * unordered_multiset
  * unordered_map
  标准非STL容器
  * array
  * stack
  * queue
  * hash_multimap
  数据结构的对比

笔记
  常用头文件
  用法注意
  位运算

常见面试题
  面试题词汇
  TopK
  5亿个int找中位数
  多线程-生产者消费者模式

Suggestion
  * Suggestion for job

Clone this wiki locally