![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
a382486075
论智硬的菜鸡成长之路
展开
-
3.Longest Substring Without Repeating Characters
1.题目: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转载 2015-09-11 22:49:55 · 240 阅读 · 0 评论 -
22. Generate Parentheses
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: "((()))", "(()())", "(())()", "()(())", "()()原创 2016-02-24 20:59:38 · 223 阅读 · 0 评论 -
21. Merge Two Sorted Lists
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Subscribe to see which companies asked this questio原创 2016-02-24 01:27:43 · 217 阅读 · 0 评论 -
20. Valid Parentheses
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, "()" and "()[]{}" are all va原创 2016-02-23 22:38:33 · 195 阅读 · 0 评论 -
19. Remove Nth Node From End of List
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 from the end, the原创 2016-02-23 22:37:28 · 210 阅读 · 0 评论 -
18. 4Sum
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. Note: Element原创 2016-02-23 22:35:23 · 205 阅读 · 0 评论 -
16. 3Sum Closest
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 would have exact原创 2016-02-23 22:33:20 · 244 阅读 · 0 评论 -
17. Letter Combinations of a Phone Number
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. Input:Digit st原创 2016-02-23 22:28:00 · 276 阅读 · 0 评论 -
15. 3Sum
public class Solution { public List> threeSum(int[] nums) { List> list = new ArrayList(); Arrays.sort(nums); int len = nums.length; for(int i = 0; i < len;i++)原创 2016-02-13 21:20:36 · 221 阅读 · 0 评论 -
leetcode DataBase
175.Combine Two Tables SELECT FirstName, LastName, City, State FROM Person LEFT JOIN Address ON Person.PersonId = Address.PersonId;原创 2016-02-13 17:38:02 · 311 阅读 · 0 评论 -
14. Longest Common Prefix
public class Solution { public String longestCommonPrefix(String[] strs) { if(strs.length == 0) return ""; if(strs.length == 1) return strs[0]; c原创 2016-02-13 17:23:57 · 188 阅读 · 0 评论 -
13.Roman to Intege
public static int romanToInt(String s) { String roman = "IVXLCDM"; int [] nums = { 1, 5 , 10, 50, 100, 500 , 1000}; char c; int lastNum = -1, num = 0; for(int i = s.length()-1; i >= 0; i--) { c = s.ch原创 2016-02-09 21:34:36 · 486 阅读 · 0 评论 -
23. Merge k Sorted Lists
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Subscribe to see which companies asked this question public ListNode mergeKLists(List原创 2016-02-24 21:06:49 · 321 阅读 · 0 评论