We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5544855 commit b2db15aCopy full SHA for b2db15a
src/main/java/com/fishercoder/solutions/_371.java
@@ -1,17 +1,11 @@
1
package com.fishercoder.solutions;
2
3
-/**
4
- * 371. Sum of Two Integers
5
- *
6
- * Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.
7
-
8
- Example:
9
- Given a = 1 and b = 2, return 3.
10
- */
11
public class _371 {
12
13
public static class Solution1 {
14
- /** reference: http://stackoverflow.com/questions/9070937/adding-two-numbers-without-operator-clarification */
+ /**
+ * reference: http://stackoverflow.com/questions/9070937/adding-two-numbers-without-operator-clarification
+ */
15
public int getSum(int a, int b) {
16
if (b == 0) {
17
return a;
0 commit comments