摘要: Plus OneGiven a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant dig... 阅读全文
posted @ 2015-06-14 06:42 轻抚离殇 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Climbing StairsYou are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct way... 阅读全文
posted @ 2015-06-14 06:39 轻抚离殇 阅读(187) 评论(0) 推荐(0) 编辑
摘要: Single Number IIGiven an array of integers, every element appearsthreetimes except for one. Find that single one.python code:class Solution: # @par... 阅读全文
posted @ 2015-06-14 06:35 轻抚离殇 阅读(275) 评论(0) 推荐(0) 编辑
摘要: Single NumberGiven an array of integers, every element appearstwiceexcept for one. Find that single one.python code:class Solution: # @param {integ... 阅读全文
posted @ 2015-06-14 06:32 轻抚离殇 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Intersection of Two Linked ListsWrite a program to find the node at which the intersection of two singly linked lists begins.For example, the followin... 阅读全文
posted @ 2015-06-14 06:25 轻抚离殇 阅读(539) 评论(0) 推荐(0) 编辑
摘要: Find Peak ElementA peak element is an element that is greater than its neighbors.Given an input array wherenum[i] ≠ num[i+1], find a peak element and ... 阅读全文
posted @ 2015-06-14 06:16 轻抚离殇 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 模式识别课上老师留了个实验,在VC++环境下利用OpenCV库编程实现人脸检测与跟踪。然后就开始下载opencv和vs2012,再然后,配置了好几次还是配置不成功,这里不得不吐槽下微软,软件做这么大,这么难用真的好吗?于是就尝试了一下使用python完成实验任务,大概过程就是这样子的:首先,配置运行... 阅读全文
posted @ 2015-06-08 07:52 轻抚离殇 阅读(2935) 评论(1) 推荐(1) 编辑
摘要: Number of 1 BitsWrite a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as theHamming weight).For exampl... 阅读全文
posted @ 2015-06-06 18:30 轻抚离殇 阅读(396) 评论(0) 推荐(0) 编辑
摘要: Reverse BitsReverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as000000101001010000011110100111... 阅读全文
posted @ 2015-06-06 18:23 轻抚离殇 阅读(307) 评论(0) 推荐(0) 编辑