自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 58. Length of Last Word

problem:Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word does not exist, return 0.N

2016-12-14 16:19:36 196

原创 57. Insert Interval

problem:Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially sorted according to their sta

2016-12-14 11:22:45 261

原创 ubuntu修改分区大小修改分区大小

当初安装win7+ubuntu双系统的时候没注意,导致\home空间只有50g,用了一段时间后觉得明显不够用。重装系统的话又很麻烦,于是在网上搜索了好久之后,发现分区修改利器:gparted。首先去官网下载安装镜像文件,制作成系统盘,类似系统安装,重启电脑后按f12进入。选择safe graphic setting进入,不需要key map映射,接下来按照提示选择选项之后进入图形界面,

2016-12-13 22:26:56 3575

原创 56. Merge Intervals

problem:Given a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18].1.先将目标区间数组按X轴从小到大排序,2.扫描排序后的目标区间数组,将

2016-12-13 12:28:21 235

原创 55. Jump Game

problem:Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position. 

2016-12-13 11:33:55 293

原创 54. Spiral Matrix

problem:Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7,

2016-12-13 10:41:21 258

原创 Matlab/C++混合编程中数据保存与使用

最近做的项目中,需要对输入图像做预处理,可是在C++中直接对图片操作不直观,所以想先把图片打包在matlab上做处理之后再输入到C++工程中的网络中使用。

2016-12-12 21:51:58 606

原创 53. Maximum Subarray

problem:Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [-2,1,-3,4,-1,2,1,-5,4],the contiguous subarray

2016-12-12 09:54:14 387

原创 51. N-Queens

problem:The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.Given an integer n, return all distinct solutions to the n-que

2016-12-11 17:33:11 204

原创 50. Pow(x, n)

problem:Implement pow(x, n).此题为求解x的n次幂。此题的解题思路比较简单:将n次幂“折半”,即:Pow(x,n)=Pow(x,n/2)*Pow(x,n/2)或者Pow(x,n)=Pow(x,n/2)*Pow(x,n/2)*x,如此往复,则可降低时间复杂度,但要注意边界条件的处理:1.幂n=0,返回1.0;2.基x=0,返回0.0;3.幂n<0

2016-12-06 22:24:59 285

转载 Ubuntu 文件夹 右键打开终端

sudo apt-get install nautilus-open-terminal注销或重启即可生效

2016-12-06 16:17:32 314

原创 deep learning学习-caffe安装记录

Caffe是一个开源的深度学习框架,使用C++/CUDA编写,支持命令行、Python、MATLAB和C++接口,可以在CPU和GPU之间进行无缝切换。其详细介绍见官网。Caffe上手容易,而且有众多大牛的深度学习算法在Caffe上的实现,对于DL入门而言很有帮助。下面记录一下caffe安装的过程,以便以后再需安装的时候,方便回顾。自己所用系统为ubuntu14.04先配置一下caffe安

2016-12-06 16:07:21 497

原创 Ubuntu14.04安装记录

最近又给电脑重装了双系统,把几个分区的关键点记录一下免得以后再安装的时候又各种找教程。1.制作ubuntu14.04系统盘,下载iso镜像文件,用ultraiso进行u盘刻录。2.插入u盘,开机,按f12进入bios系统,选择u盘进入。3.按流程选择语言,最好将电脑断网,以免安装时不必要的更新。4.安装类型选择其他,这样有机会自己设置各种区的大小。下面分区顺序以及选项如图,图是

2016-12-06 15:45:36 387

原创 49. Group Anagrams

problem:Given an array of strings, group anagrams together.For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return:[ ["ate", "eat","tea"], ["nat","tan"], ["bat"]]

2016-12-06 15:28:00 229

原创 48. Rotate Image

problem:You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?首先沿着副对角线翻转一次,然后水平翻转一次即可。class Solution

2016-12-06 13:40:11 190

原创 47. Permutations II

problem:Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2] have the following unique permutations:[ [1,1,2], [

2016-12-05 16:44:18 207

原创 46. Permutations

problem:Given a collection of distinct numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,

2016-12-05 15:27:49 207

原创 45. Jump Game II

problem:Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position. 

2016-12-05 14:41:49 236

原创 视觉皮层通路生物机制有关知识记录(摘抄)

机器视觉的研究是个有挑战性又非常有实用价值的研究课题。近年来,由于科学技术及研究方法的不断发展和进步,视觉信息的研究成为图像处理、人工智能、模式识别、神经生理学、认知心理学、自动化及计算机等众多学科的研究热点。生物(包括人类自身)的视觉系统是视觉(图像)信号处理的一个典范。由于视网膜位于视觉信息处理系统的最前端,因而成为了脑科学等领域的研究热点之一。1.视网膜       视网膜是位于视觉

2016-12-03 21:38:24 3502

原创 44. Wildcard Matching

problem:Implement wildcard pattern matching with support for '?' and '*'.'?' Matches any single character.'*' Matches any sequence of characters (including the empty sequence).The matching

2016-12-03 17:22:20 263

原创 43. Multiply Strings

problem:Given two numbers represented as strings, return multiplication of the numbers as a string.Note:The numbers can be arbitrarily large and are non-negative.Converting the input s

2016-12-03 15:48:14 217

原创 42. Trapping Rain Water

problem:Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. For example, Given [0,1,0,2,1,0

2016-12-03 12:06:17 207

原创 41. First Missing Positive

problem:Given an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your algorithm should run in O(n) time and

2016-12-02 22:40:22 201

原创 40. Combination Sum II

problem:Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each number in C may only be used once in

2016-12-02 22:37:09 226

原创 39. Combination Sum

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

2016-12-02 21:50:51 279

原创 Deep Learning学习 - VGG-Face网络人脸识别

记录一下使用VGGNet进行人脸识别的实验过程。数据集:训练集 9W+张人脸图片,包含10000 ID。1.数据集准备将数据集图片分为训练集以及测试集两个部分,并生成标签文件,记录在.txt文件中。训练与测试图片比例为4:1。import os,shutiltrainFile = open('train.txt','w') testFile = open('test.

2016-12-02 09:40:56 11324 7

原创 38. Count and Say

problem:The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1 is read off as "one 1" or 11.11 is read off as "two 1s" or 21.21 i

2016-12-01 14:26:05 305

原创 37. Sudoku Solver

problem:该问题是数独求解问题,采用方法是深度搜索优先算法。class Solution {private: bool isOver; //是否已经找到一个正确解。 public: void dfs(vector>& board, int i, int j, int n) { if(j >= n) {

2016-12-01 11:00:28 243

原创 36. Valid Sudoku

problem:Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with the character '.'.该问题是判断该数独

2016-12-01 09:31:31 246

原创 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 337

原创 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关注的人

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