Skip to content

Commit 100672b

Browse files
committed
🎨 (solution): Format Java code
Format Java code
1 parent 1f1b926 commit 100672b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

solutions/125.Valid Palindrome/Solution.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ public boolean isPalindrome(String s) {
33
s = s.toLowerCase().replaceAll("[^a-z0-9]", "");
44
int i = 0, j = s.length() - 1;
55
while (i < j) {
6-
if (s.charAt(i++) != s.charAt(j--)) return false;
6+
if (s.charAt(i++) != s.charAt(j--))
7+
return false;
78
}
89
return true;
910
}

solutions/167. Two Integer Sum II/Solution.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ public int[] twoSum(int[] numbers, int target) {
55
while (left < right) {
66
int sum = numbers[left] + numbers[right];
77
if (sum == target) {
8-
return new int[] {left + 1, right + 1};
8+
return new int[] { left + 1, right + 1 };
99
} else if (sum < target) {
1010
left++;
1111
} else {
1212
right--;
1313
}
1414
}
1515

16-
return result;
16+
return new int[] { -1, -1 };
1717
}
1818
}

0 commit comments

Comments
 (0)