![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
wt9431
这个作者很懒,什么都没留下…
展开
-
leetcode-14 Longest Common Prefix
Question: Write a function to find the longest common prefix string amongst an array of strings. 按位匹配即可。 java代码: public class Solution { public String longestCommonPrefix(St原创 2016-11-04 02:42:45 · 120 阅读 · 0 评论 -
leetcode-16 3Sum Closet
Question: Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input wou原创 2016-11-04 05:58:46 · 147 阅读 · 0 评论 -
leetcode-17 Letter Combinations of a Phone Number
Question: Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telephone buttons) is given below.原创 2016-11-04 07:35:02 · 141 阅读 · 0 评论 -
leetcode-18 4Sum
Question: Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target. Not原创 2016-11-06 23:35:47 · 158 阅读 · 0 评论 -
leetcode-19 Remove Nth Node From End of List
Question: Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node f原创 2016-11-06 23:55:53 · 141 阅读 · 0 评论 -
leetcode-12 Integer to Roman
Question: Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 阿拉伯数字与罗马数字的对应关系为: String roms[] = {"I", "V", "X",原创 2016-11-01 23:01:53 · 139 阅读 · 0 评论 -
leetcode-13 Roman to Integer
Problem: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 与第12题类似,应用转换规则即可。 java代码如下: public class Solut原创 2016-11-02 21:18:23 · 119 阅读 · 0 评论