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) 编辑

32. Longest Valid Parentheses (JAVA)

摘要: Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. Example 1: Exampl 阅读全文

posted @ 2019-05-05 10:57 joannae 阅读(130) 评论(0) 推荐(0) 编辑

导航