文本
文章平均质量分 77
jmspan
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode 166. Fraction to Recurring Decimal(循环小数)
原题网址:https://leetcode.com/problems/fraction-to-recurring-decimal/ Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If the frac原创 2016-05-25 01:39:57 · 1134 阅读 · 0 评论 -
LeetCode 58. Length of Last Word(最后一个单词的长度)
原题网址:https://leetcode.com/problems/length-of-last-word/ Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.原创 2016-05-21 07:44:17 · 547 阅读 · 0 评论 -
LeetCode 65. Valid Number(校验数字)
原题网址:https://leetcode.com/problems/valid-number/ Validate if a given string is numeric. Some examples: "0" => true " 0.1 " => true "abc" => false "1 a" => false "2e10" => true Note:原创 2016-05-22 00:04:48 · 915 阅读 · 0 评论 -
LeetCode 72. Edit Distance(编辑距离)
原题网址:https://leetcode.com/problems/edit-distance/ Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) Y原创 2016-05-22 05:18:34 · 741 阅读 · 0 评论 -
LeetCode 93. Restore IP Addresses(恢复IP地址)
原题网址:https://leetcode.com/problems/restore-ip-addresses/ Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example: Given "2552551原创 2016-05-23 00:34:59 · 1250 阅读 · 0 评论 -
LeetCode 71. Simplify Path(简化路径)
原题网址:https://leetcode.com/problems/simplify-path/ Given an absolute path for a file (Unix-style), simplify it. For example, path = "/home/", => "/home" path = "/a/./b/../../c/", => "/c"原创 2016-05-22 00:05:09 · 801 阅读 · 0 评论 -
LeetCode 68. Text Justification(文本对齐)
原题网址:https://leetcode.com/problems/text-justification/ Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified原创 2016-05-22 00:05:06 · 1108 阅读 · 0 评论 -
LeetCode 13. Roman to Integer(罗马数字转阿拉伯数字)
原题网址:https://leetcode.com/problems/roman-to-integer/ Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 方法:理解罗马数字。 public class Solut原创 2016-05-19 05:33:26 · 734 阅读 · 0 评论 -
LeetCode 165. Compare Version Numbers(比较版本)
原题网址:https://leetcode.com/problems/compare-version-numbers/ Compare two version numbers version1 and version2. If version1 > version2 return 1, if version1 version2 return -1, otherwise return 0原创 2016-05-25 01:40:07 · 506 阅读 · 0 评论 -
LeetCode 468. Validate IP Address
原题网址:https://leetcode.com/problems/validate-ip-address/ 方法:扫描检查,代码写得比较丑陋,暂时凑合着。 public class Solution { private static final String NEITHER = "Neither"; private static final String IPV4 = "I原创 2016-12-15 06:07:59 · 764 阅读 · 0 评论
分享