10000 change class name and add in README.md · bloomer1/Leetcode@a192006 · GitHub
[go: up one dir, main page]

Skip to content

Commit a192006

Browse files
change class name and add in README.md
1 parent a3e71e4 commit a192006

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ Your ideas/fixes/algorithms are more than welcome!
270270
|170|[Two Sum III - Data structure design](https://leetcode.com/problems/two-sum-iii-data-structure-design/)|[Solution](../master/src/main/java/com/stevesun/solutions/TwoSumIIIDataStructureDesign.java)| O(n)|O(n)| Easy
271271
|169|[Majority Element](https://leetcode.com/problems/majority-element/)|[Solution](../master/src/main/java/com/stevesun/solutions/MajorityElement.java)| O(n)|O(1) | Easy|
272272
|168|[Excel Sheet Column Title](https://leetcode.com/problems/excel-sheet-column-title/)|[Solution](../master/src/main/java/com/stevesun/solutions/ExcelSheetColumnTitle.java)| O(n)|O(1) | Easy|
273+
|167|[Two Sum II - Input array is sorted](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/)|[Solution](../master/src/main/java/com/stevesun/solutions/_167.java)| O(logn)|O(1) | Easy|
273274
|165|[Compare Version Numbers](https://leetcode.com/problems/compare-version-numbers/)|[Solution](../master/src/main/java/com/stevesun/solutions/CompareVersionNumbers.java)| O(n)|O(1) | Easy|
274275
|164|[Maximum Gap](https://leetcode.com/problems/maximum-gap/)|[Solution](../master/src/main/java/com/stevesun/solutions/MaximumGap.java) | O(n) |O(n) | Hard|
275276
|163|[Missing Ranges](https://leetcode.com/problems/missing-ranges/)|[Solution](../master/src/main/java/com/stevesun/solutions/MissingRanges.java) | O(n) |O(1) | |

src/main/java/com/stevesun/solutions/TwoSumIIInputArrayIsSorted.java renamed to src/main/java/com/stevesun/solutions/_167.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import com.stevesun.common.utils.CommonUtils;
44

55
/**
6+
* 167. Two Sum II - Input array is sorted
7+
*
68
* Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.
79
810
The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than index2. Please note that your returned answers (both index1 and index2) are not zero-based.
@@ -13,7 +15,7 @@ The function twoSum should return indices of the two numbers such that they add
1315
Output: index1=1, index2=2
1416
1517
*/
16-
public class TwoSumIIInputArrayIsSorted {
18+
public class _167 {
1719
public static int[] twoSum(int[] numbers, int target) {
1820
int left = 0, right = numbers.length-1;
1921
int[] result = new int[2];

0 commit comments

Comments
 (0)
0