- 博客(7)
- 收藏
- 关注
原创 28 实现strStr() Implement strStr()
给定一个 haystack 字符串和一个 needle 字符串,在 haystack 字符串中找出 needle 字符串出现的第一个位置 (从0开始)。如果不存在,则返回 -1。class Solution {public: int strStr(string haystack, string needle) { if(needle.empty()) return...
2018-08-13 23:54:46 148
原创 125 验证回文串 Valid Palindrome
给定一个字符串,验证它是否是回文串,只考虑字母和数字字符,可以忽略字母的大小写。class Solution {public: bool isPalindrome(string s) { if(s.empty()) return true; int left = 0, right = s.size() - 1 ; while (lef...
2018-08-13 21:57:11 167
原创 81 在旋转有序数组中搜索II Search in Rotated Sorted ArrayII
class Solution {public: bool search(vector<int>& nums, int target) { if(nums.empty()) return false; int left = 0,right = nums.size()-1; while(left<=right) ...
2018-08-12 21:29:12 114
原创 33 在旋转有序数组中搜索 Search in Rotated Sorted Array
class Solution {public: int search(vector<int>& nums, int target) { if(nums.empty()) return -1; int left = 0,right = nums.size()-1; while(left<=right) ...
2018-08-12 20:56:42 93
原创 80 删除排序数组中的重复项II Remove Duplicates from Sorted ArrayII
class Solution {public: int removeDuplicates(vector<int>& nums) { if(nums.empty()) return 0; int up =0,down=1,times=0; for(int i=1;i<nums.size();i++) ...
2018-08-12 15:40:52 81
原创 26 删除排序数组中的重复项 Remove Duplicates from Sorted Array
给定一个排序数组,你需要在原地删除重复出现的元素,使得每个元素只出现一次,返回移除后数组的新长度。不要使用额外的数组空间,你必须在原地修改输入数组并在使用 O(1) 额外空间的条件下完成。eg1.给定数组 nums = [1,1,2], 函数应该返回新的长度 2, 并且原数组 nums 的前两个元素被修改为1,2。 你不需要考虑数组中超出新长度后面的元素。method1:uniq...
2018-08-11 18:35:41 112
原创 深度学习Caffe实战之人脸检测
此篇文章是对tyd老师的人脸检测课程的自我总结,按需查看,概不负责。一、目的:检测到人脸框,效果图如下:二、数据分析&预处理: 2.1 数据获取 网站下载benchmark 1、论坛:http://www.thinkface.cn/portal.php 2、M...
2018-07-29 12:34:12 2323
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人