自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 问答 (2)
  • 收藏
  • 关注

原创 Search in Rotated Sorted Array

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 the array return its index

2015-10-26 21:35:17 324

原创 Remove Duplicates from Sorted Array II

Follow up for “Remove Duplicates”: What if duplicates are allowed at most twice?For example, Given sorted array nums = [1,1,1,2,2,3],Your function should return length = 5, with the first five elemen

2015-10-23 22:01:29 313

原创 static 与 const 的作用总结

一. static 1) 全局静态变量 作用: 不会被其他文件访问,修改, 其他文件可以使用相同名字的变量, 不会发生冲突, 达到隐藏的作用。 2)  局部静态变量 作用: 保持变量内容的持久 在局部变量前加上关键字static, 局部变量就被定义成一个局部静态变量。当static用来修饰局部变量的时候,它就改变了局部变量的存储位置,从原来的栈中存放改为静态存储区。但是局部静态变量在离开

2015-10-20 20:18:13 379

原创 Implement strStr

mplement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 先来暴力解法: (kmp看懂后再补。。) class Solution { public: int strStr(st

2015-10-16 21:27:12 280

原创 String

#include #include #include using namespace std; class String { public: String() : m_data(new char[1]) { *m_data = '\0'; } String(const char* str) : m_data(new char[strlen(str)+1]) { s

2015-10-06 17:45:38 294

空空如也

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

TA关注的人

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