- 博客(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
空空如也
selenium运行报错,需要的jar包都导入了
2018-03-16
如何抓取网站加密压缩后的数据?
2018-02-22
TA创建的收藏夹 TA关注的收藏夹
TA关注的人