8000 Update · fibers/ex-algorithm@94844fd · GitHub
[go: up one dir, main page]

Skip to content

Commit 94844fd

Browse files
committed
Update
1 parent 8416b1e commit 94844fd

File tree

5 files changed

+67
-0
lines changed

5 files changed

+67
-0
lines changed

pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@
2525
<version>4.11</version>
2626
<scope>test</scope>
2727
</dependency>
28+
29+
<!-- Tomcat -->
30+
<!-- https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-catalina -->
31+
<dependency>
32+
<groupId>org.apache.tomcat</groupId>
33+
<artifactId>tomcat-catalina</artifactId>
34+
<version>9.0.11</version>
35+
</dependency>
36+
37+
2838
</dependencies>
2939

3040
<build>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.fibers.algorithm.leetcode._043;
2+
3+
public class Solution {
4+
public String multiply(String num1, String num2) {
5+
if (num1.equals("0") || num2.equals("0")) {
6+
return "0";
7+
}
8+
9+
int len1 = num1.length();
10+
int len2 = num2.length();
11+
12+
return "0";
13+
}
14+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.fibers.algorithm.leetcode._048;
2+
3+
public class Solution {
4+
public void rotate(int[][] matrix) {
5+
if(matrix == null || matrix.length == 0){
6+
return;
7+
}
8+
9+
10+
}
11+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package com.fibers.algorithm.leetcode._167;
2+
3+
public class Solution {
4+
public int[] twoSum(int[] numbers, int target) {
5+
if (numbers == null || numbers.length == 0) {
6+
return new int[]{};
7+
}
8+
9+
int i = 0;
10+
int j = numbers.length - 1;
11+
12+
while (i < j) {
13+
int sum = numbers[i] + numbers[j];
14+
if (sum == target) {
15+
return new int[]{i + 1, j + 1};
16+
} else if (sum > target) {
17+
j--;
18+
} else {
19+
i++;
20+
}
21+
}
22+
23+
return new int[]{};
24+
}
25+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.fibers.algorithm.leetcode._633;
2+
3+
public class Solution {
4+
public boolean judgeSquareSum(int c) {
5+
6+
}
7+
}

0 commit comments

Comments
 (0)
0