- 博客(15)
- 收藏
- 关注
原创 LeetCode__169. Majority Element
169. Majority ElementGiven an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empt
2016-01-11 21:02:02
314
原创 Leetcode——Contains Duplicate
217. Contains DuplicateGiven an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should retur
2016-01-11 19:53:57
245
原创 leetcode_Excel Sheet Column Number
171. Excel Sheet Column NumberRelated to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example:A ->
2016-01-11 14:41:05
316
原创 Leetcode——valid Anagram——时间复杂度太高,怎么办??
242. Valid Anagram时间复杂度太高这个问题,通过空间的增大来解决,具体很简单!Given two strings s and t, write a function to determine if t is an anagram of s.For example,s =
2016-01-10 16:06:51
639
原创 LeetCode_SameTree
100. Same TreeTotal Accepted: 102505 Total Submissions: 241539 Difficulty: EasyGiven two binary trees, write a function to check if they are equal or not.Two binary trees are con
2016-01-09 22:30:32
317
原创 LeetCode_ Invert Binary Tree
226. Invert Binary TreeTotal Accepted: 60170 Total Submissions: 140987 Difficulty: EasyInvert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \
2016-01-08 22:11:50
227
原创 leetCode_Move Zeroes_
为了保证在不需要Leetcode的情况下也可以运行,我写了测试用例,希望在线下也可以用:283. Move ZeroesTotal Accepted: 44440 Total Submissions: 103965 Difficulty: EasyGiven an array nums, write a function to mov
2016-01-08 20:23:41
258
原创 LeetCode_237. Delete Node in a Linked List
237. Delete Node in a Linked ListTotal Accepted: 53467 Total Submissions: 121930 Difficulty: EasyWrite a function to delete a node (except the tail) in a singly linked list, given
2016-01-08 15:12:31
344
原创 Leetcode__Maximum depth
104. Maximum Depth of Binary Treeleetcode 解题。 Submissions: 238298 Difficulty: EasyGiven a binary tree, find its maximum depth.The maximum depth is the number of
2016-01-05 22:03:31
314
原创 LeetCode__Add Digits
今天的第二题:Add DigitsGiven a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example:Given num = 38, the process is like: 3 + 8 = 11,
2015-12-30 16:20:14
282
原创 LeetCode——Nim Game
这是第二天的的编码,题目如下:. Nim GameTotal Accepted: 30590 Total Submissions: 60866 Difficulty: EasyYou are playing the following Nim Game with your friend: There is a heap of stones o
2015-12-30 10:28:28
266
原创 LeeCode_MultiplyStrings
经过昨天一天,还有今天的学习,终于是把第一个程序给搞出来,虽然是借鉴他人的,但是还是收获颇多。现在把这个程序的问题,和解决方案在下面贴出:MultiplyStringsGiven two numbers represented as strings, return multiplication of the numbers as a string.Note: T
2015-12-29 20:22:24
255
原创 哥哥要开始刷Leecode了
哥哥要开始刷Leecode了,如题,据传很难,我要试试……之后如果有的题目我解出来了,我会列一个专门的目录,在每周进行总结。总结各个程序的解法。只求结果是accept,不考虑复杂度!年前争取搞定至少2/3!向伟大的大牛们学习!!任重而道远!从今日始!
2015-12-28 19:34:42
408
原创 关于人脸识别,稀疏表示的若干论文的小结
初次写博,如有错误,请指正,不胜感激!1:特征脸:Eigenface forrecognition:l 使用特征脸方法的进行人脸识别的步骤:l 1:首先假设人脸个数有K个,每个人脸需训练m个,确定训练脸数目M=m*K,将这个M个人脸张成一个列向量其中,T1是(Col*Row)*1维的列向量,共计有M个(T1~TM),这M个列向量构成一个向量空间A,A是(Col*Row)*M,l
2015-08-13 11:07:31
1398
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人