- 博客(9)
- 收藏
- 关注
原创 (Java)LeetCode-49. Group Anagrams
Given an array of strings, group anagrams together.For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return:[ ["ate", "eat","tea"], ["nat","tan"], ["bat"]]Note: Al
2016-09-29 23:06:19 216
原创 (Java)LeetCode-48. Rotate Image
You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?这道题木有什么难度,原地顺时针旋转一个矩阵90度,要求时间复杂度O(n2),空间复杂度
2016-09-29 15:36:17 918
原创 (Java)LeetCode-47. Permutations II
Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2] have the following unique permutations:[ [1,1,2], [1,2,1], [2,1,1
2016-09-28 13:57:43 375
原创 (Java)LeetCode-46. Permutations
Given a collection of distinct numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2],
2016-09-28 13:11:17 258
原创 (Java)LeetCode-45. Jump Game II
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Your goal i
2016-09-27 23:15:41 294
原创 (Java)LeetCode-44.Wildcard Matching
Implement wildcard pattern matching with support for '?' and '*'.'?' Matches any single character.'*' Matches any sequence of characters (including the empty sequence).The matching should cover t
2016-09-20 15:46:35 833
原创 (Java)LeetCode-43. Multiply Strings
Given two numbers represented as strings, return multiplication of the numbers as a string.Note:The numbers can be arbitrarily large and are non-negative.Converting the input string to integ
2016-09-16 22:56:51 359
原创 (Java)LeetCode-42. Trapping Rain Water
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.For example, Given [0,1,0,2,1,0,1,3,2,1,2,1]
2016-09-16 20:22:17 290
原创 (Java)LeetCode-41. First Missing Positive
Given an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your algorithm should run in O(n) time and uses constant
2016-09-16 15:07:59 503
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人