Skip to content

Commit 56d3041

Browse files
edit 525
1 parent d70d09b commit 56d3041

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Your ideas/fixes/algorithms are more than welcome!
5353
|530|[Minimum Absolute Difference in BST](https://leetcode.com/problems/minimum-absolute-difference-in-bst/)|[Solution](../master/src/main/java/com/stevesun/solutions/MinimumAbsoluteDifferenceinBST.java) | O(n) |O(n) | Easy| DFS
5454
|529|[Minesweeper](https://leetcode.com/problems/minesweeper/)|[Solution](../master/src/main/java/com/stevesun/solutions/Minesweeper.java) | O(m*n) |O(k) | Medium | BFS
5555
|526|[Beautiful Arrangement](https://leetcode.com/problems/beautiful-arrangement/)|[Solution](../master/src/main/java/com/stevesun/solutions/BeautifulArrangement.java) | O(n) |O(h) | Medium | Backtracking
56-
|525|[Contiguous Array](https://leetcode.com/problems/contiguous-array/)|[Solution](../master/src/main/java/com/stevesun/solutions/ContiguousArray.java) | O(n) |O(n) | Medium | HashMap
56+
|525|[Contiguous Array](https://leetcode.com/problems/contiguous-array/)|[Solution](../master/src/main/java/com/stevesun/solutions/_525.java) | O(n) |O(n) | Medium | HashMap
5757
|524|[Longest Word in Dictionary through Deleting](https://leetcode.com/problems/longest-word-in-dictionary-through-deleting/)|[Solution](../master/src/main/java/com/stevesun/solutions/_524.java) | O(n) |O(n) | Medium | Sort
5858
|523|[Continuous Subarray Sum](https://leetcode.com/problems/continuous-subarray-sum/)|[Solution](../master/src/main/java/com/stevesun/solutions/ContinuousSubarraySum.java) | O(n^2) |O(n) | Medium|
5959
|522|[Longest Uncommon Subsequence II](https://leetcode.com/problems/longest-uncommon-subsequence-ii/)|[Solution](../master/src/main/java/com/stevesun/solutions/LongestUncommonSubsequenceII.java) | O(x*n^2) (x is average length of strings)|O(1) | Medium|

src/main/java/com/stevesun/solutions/ContiguousArray.java renamed to src/main/java/com/stevesun/solutions/_525.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
2121
Note: The length of the given binary array will not exceed 50,000.
2222
*/
23-
public class ContiguousArray {
23+
public class _525 {
2424

2525
//credit: https://leetcode.com/articles/contiguous-array/#approach-3-using-hashmap-accepted
2626
public int findMaxLength(int[] nums) {

src/test/java/com/stevesun/ContiguousArrayTest.java renamed to src/test/java/com/stevesun/_525Test.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
package com.stevesun;
22

3-
import com.stevesun.solutions.ContiguousArray;
43
import org.junit.Before;
54
import org.junit.BeforeClass;
65
import org.junit.Test;
76

87
import static junit.framework.Assert.assertEquals;
98

10-
public class ContiguousArrayTest {
11-
private static ContiguousArray test;
9+
public class _525Test {
10+
private static com.stevesun.solutions._525 test;
1211
private static int expected;
1312
private static int actual;
1413
private static int[] nums;
1514

1615
@BeforeClass
1716
public static void setup(){
18-
test = new ContiguousArray();
17+
test = new com.stevesun.solutions._525();
1918
}
2019

2120
@Before

0 commit comments

Comments
 (0)