- 博客(4)
- 收藏
- 关注
原创 Floyd's Cycle-Finding Algorithm
s --a-- begin --x----meet point | | |----------------|1.fast goes two steps each time, while slow goes one step each time.2.Supposing slow goes d, then fast goes 2*...
2018-03-26 18:14:38
323
原创 C++ unordered_map使用方法
1.key-value存储,不会根据key的大小进行排序(与ordered_map比较)2.键唯一。容器内不存在两元素有相同的key。3.函数if(imap.find(targetNum) != imap.end() ){}
2018-03-26 10:24:18
1195
原创 C/C++链表操作
1.声明#include <stdio.h>#include <stdlib.h>typedef struct listNode{ int data; struct listNode *next;} listNode, *linkedList;For C++:typedef struct listNode{ int data; s...
2018-03-26 10:23:49
123
原创 C++ vector 使用方法
1.头文件#include<vector>2.声明及初始化vector<int> vec // 声明一个int型向量vector<int> vec(10); //声明一个int型向量,大小为10vector<int> tmp(vec.begin(), vec.begin() + 3); //用向量vec的第0个到第2个值初始化tmp3.基本...
2018-03-22 16:50:57
189
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅