上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 43 下一页

2019年5月6日

47. Permutations II (JAVA)

摘要: Given a collection of numbers that might contain duplicates, return all possible unique permutations. Example: 有重复数字的情况,之前在Subsets II,我们采取的是在某一个递归内,用f 阅读全文

posted @ 2019-05-06 16:33 joannae 阅读(163) 评论(0) 推荐(0) 编辑

46. Permutations (JAVA)

摘要: Given a collection of distinct integers, return all possible permutations. Example: 规律:类似插入排序,每个数都有多个可插入的位置。 递归的时候:循环插入的位置。递归结束条件:插入到最后一个数。 阅读全文

posted @ 2019-05-06 15:09 joannae 阅读(203) 评论(0) 推荐(0) 编辑

45. Jump Game II (JAVA)

摘要: 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 maxim 阅读全文

posted @ 2019-05-06 14:06 joannae 阅读(212) 评论(0) 推荐(0) 编辑

43. Multiply Strings (JAVA)

摘要: Given two non-negative integers num1 and num2represented as strings, return the product of num1 and num2, also represented as a string. Example 1: Exa 阅读全文

posted @ 2019-05-06 11:57 joannae 阅读(116) 评论(0) 推荐(0) 编辑

2019年5月5日

42. Trapping Rain Water (JAVA)

摘要: 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. 阅读全文

posted @ 2019-05-05 20:21 joannae 阅读(158) 评论(0) 推荐(0) 编辑

41. First Missing Positive (JAVA)

摘要: Given an unsorted integer array, find the smallest missing positive integer. Example 1: Example 2: Example 3: Note: Your algorithm should run in O(n) 阅读全文

posted @ 2019-05-05 18:06 joannae 阅读(119) 评论(0) 推荐(0) 编辑

40. Combination Sum II (JAVA)

摘要: Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numb 阅读全文

posted @ 2019-05-05 16:04 joannae 阅读(168) 评论(0) 推荐(0) 编辑

39. Combination Sum (Java)

摘要: Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the 阅读全文

posted @ 2019-05-05 14:22 joannae 阅读(139) 评论(0) 推荐(0) 编辑

34. Find First and Last Position of Element in Sorted Array (JAVA)

摘要: Given an array of integers nums sorted in ascending order, find the starting and ending position of a given targetvalue. Your algorithm's runtime comp 阅读全文

posted @ 2019-05-05 11:50 joannae 阅读(239) 评论(0) 推荐(0) 编辑

33. Search in Rotated Sorted Array (JAVA)

摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文

posted @ 2019-05-05 11:16 joannae 阅读(133) 评论(0) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 43 下一页

导航