Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0d90fca

Browse files
committed
修改package 增加no102
1 parent 6adc7b4 commit 0d90fca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1386
-661
lines changed

.idea/inspectionProfiles/Project_Default.xml

+36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/leetcode.iml

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

+642
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

leetcode/Array/No14.java

+22-18
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,27 @@
33
import java.util.Arrays;
44

55
class No14 {
6-
public String longestCommonPrefix(String[] strs) {
7-
Arrays.sort(strs);
8-
int i = 0;
9-
if (strs.length == 0) {
10-
return "";
11-
}
12-
if (strs == null) {
13-
return null;
14-
}
15-
while (i < strs[0].length() && strs[0].toCharArray()[i] == (strs[strs.length - 1].toCharArray()[i])) {
16-
i++;
17-
}
18-
if (i == 0) {
19-
return "";
20-
} else {
21-
return strs[0].substring(0, i);
22-
}
6+
public String longestCommonPrefix(String[] strs) {
7+
Arrays.sort(strs);
8+
int i = 0;
9+
if (strs.length == 0) {
10+
return "";
11+
}
12+
if (strs == null) {
13+
return null;
14+
}
15+
while (i < strs[0].length() && strs[0].toCharArray()[i] == (strs[strs.length - 1].toCharArray()[i])) {
16+
i++;
17+
}
18+
if (i == 0) {
19+
return "";
20+
} else {
21+
return strs[0].substring(0, i);
22+
}
2323

24-
}
24+
}
25+
26+
public static void main(String[] args) {
27+
System.out.println(111);
28+
}
2529
}

leetcode/Tree/No100.java

-49
This file was deleted.

leetcode/Tree/No101.java

-24
This file was deleted.

leetcode/Tree/No104.java

-25
This file was deleted.

leetcode/Tree/No107.java

-49
This file was deleted.

leetcode/Tree/No108.java

-23
This file was deleted.

leetcode/Tree/No110.java

-41
This file was deleted.

leetcode/Tree/No111.java

-32
This file was deleted.

0 commit comments

Comments
 (0)