- 博客(7)
- 收藏
- 关注
原创 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, andn = 2. After removing the second node f
2016-11-06 23:55:53 139
原创 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 157
原创 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 137
原创 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 145
原创 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 115
原创 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 116
原创 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 138
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人