Skip to content

Commit 68bbc8b

Browse files
edit 371
1 parent 5808446 commit 68bbc8b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ Your ideas/fixes/algorithms are more than welcome!
214214
|374|[Guess Number Higher or Lower](https://leetcode.com/problems/guess-number-higher-or-lower/)|[Solution](../master/src/main/java/com/fishercoder/solutions/GuessNumberHigherorLower.java)| O(logn)|O(1) | Easy| Binary Search
215215
|373|[Find K Pairs with Smallest Sums](https://leetcode.com/problems/find-k-pairs-with-smallest-sums/)|[Solution](../master/src/main/java/com/fishercoder/solutions/FindKPairsWithSmallestSums.java)| O(?)|O(?) | Medium| Heap
216216
|372|[Super Pow](https://leetcode.com/problems/super-pow/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_372.java)| O(n)|O(1) | Medium| Math
217-
|371|[Sum of Two Integers](https://leetcode.com/problems/sum-of-two-integers/)|[Solution](../master/src/main/java/com/fishercoder/solutions/SumofTwoIntegers.java)| O(n)|O(1) | Easy|
217+
|371|[Sum of Two Integers](https://leetcode.com/problems/sum-of-two-integers/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_371.java)| O(n)|O(1) | Easy|
218218
|370|[Range Addition](https://leetcode.com/problems/range-addition/)|[Solution](../master/src/main/java/com/fishercoder/solutions/RangeAddition.java)| O(n+k)|O(1) | Medium|
219219
|369|[Plus One Linked List](https://leetcode.com/problems/plus-one-linked-list/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_369.java)| O(n)|O(1) | Medium| Linked List
220220
|368|[Largest Divisible Subset](https://leetcode.com/problems/largest-divisible-subset/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_368.java)| O(n^2)|O(n) | Medium| DP

src/main/java/com/fishercoder/solutions/SumofTwoIntegers.java renamed to src/main/java/com/fishercoder/solutions/_371.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
55
Example:
66
Given a = 1 and b = 2, return 3.*/
7-
public class SumofTwoIntegers {
8-
//This post is very helpful: http://stackoverflow.com/questions/9070937/adding-two-numbers-without-operator-clarification
7+
public class _371 {
8+
9+
/**reference: http://stackoverflow.com/questions/9070937/adding-two-numbers-without-operator-clarification*/
910
public int getSum(int a, int b) {
1011
if(b == 0) return a;
1112
int sum = a^b;
1213
int carry = (a&b) << 1;
1314
return getSum(sum, carry);
1415
}
15-
1616
}

0 commit comments

Comments
 (0)