自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 收藏
  • 关注

原创 leetcode——Search for a Range 二分查找重复数字

Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the order of O(log n).If the target is not found

2016-10-20 13:39:06 507

原创 leetcode——Search Insert Position 二分查找 binary search

Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.

2016-10-20 10:00:49 285

原创 leetcode——backtracking and array 递归类问题

Combination Sum:Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeated number may be chosen

2016-10-19 09:38:25 248

转载 c++标准库——容器类

容器类可以分为两大类和容器适配器:(1)序列容器(Sequence containers)这种容器中的元素是有序的,每一个元素在容器中都有一个确切的位置,这个位置不依赖于元素的值,而是跟放入容器的时机有关。标准的序列容器有三个:vector, deque, list。另外你也可以把字符串(string)和数组(array)看成序列容器。  Vectors一个vector

2016-09-12 16:00:14 1239

转载 leetcode--merge two sorted lists

原题目连接:        https://leetcode.com/problems/merge-two-sorted-lists/Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first

2016-09-05 15:26:58 185

转载 leetecode——add two numbers

原题目连接  https://leetcode.com/problems/add-two-numbers/You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain

2016-09-01 11:03:18 312

转载 leetcode--sum of two integers

原题目网址    https://leetcode.com/problems/sum-of-two-integers/Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.Example:Given a = 1 and b = 2, ret

2016-08-31 15:27:56 136

原创 hackerrank----Flatland Space Stations

原题目网址:   https://www.hackerrank.com/challenges/flatland-space-stationsFlatland is a country with  cities,  of which have space stations. Its cities () are numbered from  to , where  city is referred

2016-08-30 09:59:39 661

原创 hackerrank笔记——lisa's workbook

题目链接:Lisa's WorkbookLisa just got a new math workbook. A workbook contains exercise problems, grouped into chapters.There are  chapters in Lisa's workbook, numbered from  to .The -th

2016-08-15 15:11:10 247

原创 c++顺序容器

一 顺序容器类型:deque   双端队列,头尾位置插入删除#include  dequelist     双向链表,在任何位置进行插入删除#include  listarray   固定大小数组,随机访问不可添加删除,与内置数组不同#includevector string二  容器的操作容器类型成员      vector::iterator it    v

2016-08-11 19:37:34 121

原创 c++标准库类型——vector

一   标准库类型vector表示对象的集合,对象类型相同,需要:#include using namespace std; or using std::vector;二   定义和初始化vector对象vector v1; vector v2(v1);vector v2=v1;vector v3(n,val); \\n个val元素vector v4(n);\\n个

2016-08-11 15:06:20 268

原创 c++_标准库类型string

一  标准库类型 string 是可变长的字符序列,使用string类型需要:#includeusing namespace std;  or   using std::string;二 定义与初始化            直接初始化                             拷贝初始化             string s1;          

2016-08-11 11:01:48 193

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除