上一页 1 2 3 4 5 6 7 8 9 ··· 16 下一页

Leetcode: Valid Number

摘要: Validate if a given string is numeric.Some examples:"0"=>true" 0.1 "=>true"abc"=>false"1 a"=>false"2e10"=>trueNote:It is intended for the problem stat... 阅读全文
posted @ 2014-12-12 12:54 Ryan-Xing 阅读(236) 评论(0) 推荐(0) 编辑

Leetcode: Anagrams

摘要: Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.分析:此题的题意不是很明确,意思重新表述应该是一组string里面,有几个... 阅读全文
posted @ 2014-12-10 20:56 Ryan-Xing 阅读(149) 评论(0) 推荐(0) 编辑

Leetcode: Distinct Subsequences

摘要: Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is formed from the orig... 阅读全文
posted @ 2014-12-10 14:01 Ryan-Xing 阅读(122) 评论(0) 推荐(0) 编辑

Python下载Yahoo!Finance数据

摘要: Python下载Yahoo!Finance数据的三种工具:(1)yahoo-finance package.(2)ystockquote.(3)pandas. 阅读全文
posted @ 2014-12-09 22:01 Ryan-Xing 阅读(1712) 评论(0) 推荐(0) 编辑

Leetcode: Integer to Roman

摘要: Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.分析:这道题参考leetcode.pdf的解法,代码简洁,处理的巧妙。值得借鉴的几点如下... 阅读全文
posted @ 2014-12-09 20:26 Ryan-Xing 阅读(87) 评论(0) 推荐(0) 编辑

Leetcode: Interleaving String

摘要: Givens1,s2,s3, find whethers3is formed by the interleaving ofs1ands2.For example,Given:s1="aabcc",s2="dbbca",Whens3="aadbbcbcac", return true.Whens3="... 阅读全文
posted @ 2014-12-09 19:46 Ryan-Xing 阅读(128) 评论(0) 推荐(0) 编辑

Leetcode: Length of Last Word

摘要: Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe... 阅读全文
posted @ 2014-12-09 13:35 Ryan-Xing 阅读(86) 评论(0) 推荐(0) 编辑

Leetcode: Longest Common Prefix

摘要: Write a function to find the longest common prefix string amongst an array of strings.分析:这道题没什么好方法,暴力搜索比较即可,在用C++实现时有一个小trick就是"Ifposis equal to thest... 阅读全文
posted @ 2014-12-09 12:47 Ryan-Xing 阅读(84) 评论(0) 推荐(0) 编辑

Leetcode: Longest Palindromic Substring

摘要: Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa... 阅读全文
posted @ 2014-12-09 12:07 Ryan-Xing 阅读(181) 评论(0) 推荐(0) 编辑

Leetcode: Longest Substring Without Repeating Characters

摘要: Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo... 阅读全文
posted @ 2014-12-08 19:39 Ryan-Xing 阅读(129) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 16 下一页