- 博客(6)
- 收藏
- 关注
转载 STL基本容器的使用
C++中有两种类型的容器:顺序容器和关联容器。顺序容器主要有vector、list、deque等。其中vector表示一段连续的内存,基于数组实现,list表示非连续的内存,基于链表实现,deque与vector类似,但是对首元素提供插入和删除的双向支持。关联容器主要有map和set。map是key-value形式,set是单值。map和set只能存放唯一的key,multimap和multiset
2017-09-15 09:57:44
204
原创 2. Add Two Numbers
Add Two NumbersYou are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two number
2017-09-13 15:41:21
178
转载 vector向量类(2)
vector常见函数使用: push_back 在数组的最后添加一个数据 pop_back 去掉数组的最后一个数据 at 得到编号位置的数据 begin 得到数组头的指针 end 得到数组的最后一个单元+1的指针 front 得到数组头的引用 back
2017-09-11 12:55:18
295
转载 vector向量类(1)
一、向量的介绍 向量 vector 是一种对象实体, 能够容纳许多其他类型相同的元素, 因此又被称为容器。 与string相同, vector 同属于STL(Standard Template Library, 标准模板库)中的一种自定义的数据类型, 可以广义上认为是数组的增强版。 在使用它时, 需要包含头文件 vector, #include vector 容器
2017-09-11 12:53:49
544
原创 1、Two Sum
1、Two SumGiven an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the
2017-09-11 12:48:21
166
转载 IPV6套接字介绍
IPv6套接字编程 1.概述 由于互联网用户的日益增加,网络需求日益扩大,IPv4地址也日益紧张。人们为了解决地址日趋耗尽的问题,采用了CIDR、NAT等技术来延缓地址耗尽的速度,但这并不能从根本上解决IPv4目前存在的问题,IPv4地址耗尽只是一个时间问题。随着互联网的发展,Internet骨干路由器的路由表也日益扩大,这使得路由器必须维护大量路由表。 由于IPv6可以解决传统的IP技术的
2017-08-02 22:34:49
1117
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人