From 9226901705bed3b45df573a0455025b50a438a20 Mon Sep 17 00:00:00 2001 From: fighter Date: Sat, 11 May 2019 19:45:39 +0800 Subject: [PATCH] fix --- notes/Leetcode 题解 - 二分查找.md | 2 +- notes/Leetcode 题解 - 分治.md | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/notes/Leetcode 题解 - 二分查找.md b/notes/Leetcode 题解 - 二分查找.md index d5dd007b..d2c64f97 100644 --- a/notes/Leetcode 题解 - 二分查找.md +++ b/notes/Leetcode 题解 - 二分查找.md @@ -257,7 +257,7 @@ public int findMin(int[] nums) { ## 6. 查找区间 -[34. Search for a Range (Medium)](https://leetcode.com/problems/search-for-a-range/description/) +[34. Find First and Last Position of Element in Sorted Array (Medium)](https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/) ```html Input: nums = [5,7,7,8,8,10], target = 8 diff --git a/notes/Leetcode 题解 - 分治.md b/notes/Leetcode 题解 - 分治.md index cafb3a45..71df3d18 100644 --- a/notes/Leetcode 题解 - 分治.md +++ b/notes/Leetcode 题解 - 分治.md @@ -77,6 +77,9 @@ The above output corresponds to the 5 unique BST's shown below: ```java public List generateTrees(int n) { + if(n < 1){ + return new LinkedList(); + } return generateSubtrees(1, n); }