自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 35. Search Insert Position

problem: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

2016-11-30 16:51:59 280

原创 34. Search for a Range

problem: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

2016-11-30 16:20:59 212

原创 33. Search in Rotated Sorted Array

problem:Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to search. If found in t

2016-11-30 12:41:03 352

原创 32. Longest Valid Parentheses

problem:Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", the longest valid parentheses substri

2016-11-29 21:03:02 338

原创 30. Substring with Concatenation of All Words

Problem:这道题注意利用c++中map my_map的特性。的特性。例如:1.my_map.count(str)返回字典中是否有该string;            2.my_map[string]可存储该string的个数。对于string,可以通过my_string.substr(i,word_length)获得子字符串。这些操作都可以简化代码。解题思路为:

2016-11-29 10:53:20 290

原创 31.Next Permutation

Promblem:题意为寻找比当前序列大的新序列。那什么叫比前序列大呢?其实可以把数字序列理解为多位数字,对于n位序列,可以组成n!个数字,那么所谓的序列大就是新序列的数值大小比旧的序列大,并且是所有满足条件中的数值中最小的那一个。所以要满足两个条件:1.新序列要比旧的序列大;2.新序列要是所有可行序列中最小的一个。想到自己以前枚举由小到大的序列时,一般思路为先确定高位,然

2016-11-29 09:16:21 372

原创 一个新的开始

看博客获取解决办法以及经验已经有好多年了,但是从来没有开始过自己的整理。今后希望在这个博客上记录自己大大小小的学习经验,不管是理解整理小算法题,还是自己实验室的项目纪录,或是自己平时自己做的小工程。总之反思总结整理,既然有了一个开始,就要坚持下去!

2016-11-28 22:16:34 680

空空如也

空空如也

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

TA关注的人

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