摘要: 描述Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.分析无代码 看到有用递归的方法(转载) 阅读全文
posted @ 2018-06-18 17:14 昵称真难想 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 描述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 阅读全文
posted @ 2018-06-17 17:57 昵称真难想 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 描述Write a function to find the longest common prefix string amongst an array of strings.分析从位置 0 开始,对每一个位置比较所有字符串,直到遇到一个不匹配。 代码 阅读全文
posted @ 2018-06-16 16:15 昵称真难想 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 描述Implement wildcard paern matching with support for '?' and '*'.'?' Matches any single character. '*' Matches any sequence of characters (including 阅读全文
posted @ 2018-06-16 00:33 昵称真难想 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 描述Implement regular expression matching with support for '.' and '*'.'.' Matches any single character. '*' Matches zero or more of the preceding eleme 阅读全文
posted @ 2018-06-13 22:39 昵称真难想 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 描述Given a string S, find the longest palindromic substring in S. You may assume that the maximumlength of S is 1000, and there exists one unique longe 阅读全文
posted @ 2018-06-13 22:08 昵称真难想 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 描述Given two binary strings, return their sum (also a binary string).For example, a = "11" b = "1" Return ”100” 分析 无 代码 方法二 阅读全文
posted @ 2018-06-13 17:10 昵称真难想 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 描述Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below 阅读全文
posted @ 2018-06-13 11:29 昵称真难想 阅读(142) 评论(0) 推荐(0) 编辑
摘要: KMP算法 字符串的快速匹配 阅读全文
posted @ 2018-06-13 00:09 昵称真难想 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 描述Implement strStr().Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack.分析暴力算法的复杂度是 O(m ∗ n),代 阅读全文
posted @ 2018-06-11 23:59 昵称真难想 阅读(336) 评论(0) 推荐(0) 编辑