Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita4be1b4

Browse files
rename
1 parente42be4f commita4be1b4

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Your ideas/fixes/algorithms are more than welcome!
9090
|543|[Diameter of Binary Tree](https://leetcode.com/problems/diameter-of-binary-tree/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_543.java) | O(n) |O(h) | Easy | Tree/DFS/Recursion
9191
|542|[01 Matrix](https://leetcode.com/problems/01-matrix/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_542.java) | O(m*n) |O(n) | Medium | BFS
9292
|541|[Reverse String II](https://leetcode.com/problems/reverse-string-ii/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_541.java) | O(n) |O(1) | Easy | String
93-
|540|[Single Element in a Sorted Array](https://leetcode.com/problems/single-element-in-a-sorted-array/)|[Solution](../master/src/main/java/com/fishercoder/solutions/SingleElementinaSortedArray.java)| O(n)|O(1)| Medium|
93+
|540|[Single Element in a Sorted Array](https://leetcode.com/problems/single-element-in-a-sorted-array/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_540.java)| O(n)|O(1)| Medium|
9494
|539|[Minimum Time Difference](https://leetcode.com/problems/minimum-time-difference/)|[Solution](../master/src/main/java/com/fishercoder/solutions/MinimumTimeDifference.java) | O(n) |O(1) | Medium | String
9595
|538|[Convert BST to Greater Tree](https://leetcode.com/problems/convert-bst-to-greater-tree/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_538.java) | O(nlogn) |O(n) | Medium | Tree
9696
|537|[Complex Number Multiplication](https://leetcode.com/problems/complex-number-multiplication/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_537.java) | O(1) |O(1) | Medium | Math, String

‎src/main/java/com/fishercoder/solutions/SingleElementinaSortedArray.javarenamed to‎src/main/java/com/fishercoder/solutions/_540.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Output: 10
1212
Note: Your solution should run in O(log n) time and O(1) space.
1313
*/
14-
publicclassSingleElementinaSortedArray {
14+
publicclass_540 {
1515
// TODO: Could be optimized to O(logn) by using binary search
1616
publicintsingleNonDuplicate(int[]nums) {
1717
intresult =0;

‎src/test/java/com/fishercoder/SingleElementinaSortedArrayTest.javarenamed to‎src/test/java/com/fishercoder/_540Test.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
packagecom.fishercoder;
22

3-
importcom.fishercoder.solutions.SingleElementinaSortedArray;
3+
importcom.fishercoder.solutions._540;
44
importorg.junit.Before;
55
importorg.junit.BeforeClass;
66
importorg.junit.Test;
77

88
importstaticjunit.framework.Assert.assertEquals;
99

10-
publicclassSingleElementinaSortedArrayTest {
11-
privatestaticSingleElementinaSortedArraytest;
10+
publicclass_540Test {
11+
privatestatic_540test;
1212
privatestaticintexpected;
1313
privatestaticintactual;
1414
privatestaticint[]nums;
1515

1616
@BeforeClass
1717
publicstaticvoidsetup(){
18-
test =newSingleElementinaSortedArray();
18+
test =new_540();
1919
}
2020

2121
@Before

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp