Skip to content

Commit ddd63f5

Browse files
rename
1 parent d8e43bd commit ddd63f5

19 files changed

+38
-150
lines changed

src/main/java/com/fishercoder/solutions/MissingRanges.java renamed to src/main/java/com/fishercoder/solutions/_163.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
99
For example, given [0, 1, 3, 50, 75], lower = 0 and upper = 99, return ["2", "4->49", "51->74", "76->99"].
1010
*/
11-
public class MissingRanges {
11+
public class _163 {
1212

1313
public List<String> findMissingRanges(int[] nums, int lower, int upper) {
1414
List<String> res = new ArrayList<String>();

src/main/java/com/fishercoder/solutions/NumberofSegmentsinaString.java renamed to src/main/java/com/fishercoder/solutions/_434.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
1010
Input: "Hello, my name is John"
1111
Output: 5*/
12-
public class NumberofSegmentsinaString {
12+
public class _434 {
1313

1414
public int countSegments(String s) {
1515
if (s == null || s.isEmpty()) return 0;

src/main/java/com/fishercoder/solutions/NumberComplement.java renamed to src/main/java/com/fishercoder/solutions/_476.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
Output: 0
1616
Explanation: The binary representation of 1 is 1 (no leading zero bits), and its complement is 0. So you need to output 0.
1717
*/
18-
public class NumberComplement {
18+
public class _476 {
1919

2020
public int findComplement_oneLiner(int num) {
2121
return ~num & ((Integer.highestOneBit(num) << 1) - 1);

src/main/java/com/fishercoder/solutions/NextGreaterElementI.java renamed to src/main/java/com/fishercoder/solutions/_496.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
All elements in nums1 and nums2 are unique.
2727
The length of both nums1 and nums2 would not exceed 1000.
2828
*/
29-
public class NextGreaterElementI {
29+
public class _496 {
3030

3131
public int[] nextGreaterElement_clever_way(int[] findNums, int[] nums) {
3232
Stack<Integer> stack = new Stack();

src/main/java/com/fishercoder/solutions/NextGreaterElementII.java renamed to src/main/java/com/fishercoder/solutions/_503.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
The second 1's next greater number needs to search circularly, which is also 2.
1717
Note: The length of given array won't exceed 10000.
1818
*/
19-
public class NextGreaterElementII {
19+
public class _503 {
2020

2121
//Credit: https://discuss.leetcode.com/topic/77881/typical-ways-to-solve-circular-array-problems-java-solution
2222
//Note: we store INDEX into the stack, reversely, the larger index put at the bottom of the stack, the smaller index at the top

src/main/java/com/fishercoder/solutions/MinimumTimeDifference.java renamed to src/main/java/com/fishercoder/solutions/_539.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
The number of time points in the given list is at least 2 and won't exceed 20000.
1414
The input time is legal and ranges from 00:00 to 23:59.
1515
*/
16-
public class MinimumTimeDifference {
16+
public class _539 {
1717

1818
public int findMinDifference(List<String> timePoints) {
1919
// there are in total 24*60 = 1440 possible time points

src/main/java/com/fishercoder/solutions/NextGreaterElementIII.java renamed to src/main/java/com/fishercoder/solutions/_556.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Input: 21
1313
* Output: -1
1414
*/
15-
public class NextGreaterElementIII {
15+
public class _556 {
1616
//credit: https://discuss.leetcode.com/topic/85759/this-problem-is-the-same-to-next-permutation-algorithm-only and https://discuss.leetcode.com/topic/85755/java-solution-like-next-permutation-problem-o-n
1717

1818
public int nextGreaterElement(int n) {

src/test/java/com/fishercoder/MaxConsecutiveOnesIITest.java

-54
This file was deleted.

src/test/java/com/fishercoder/TheMazeIIITest.java

-58
This file was deleted.

src/test/java/com/fishercoder/MissingRangesTest.java renamed to src/test/java/com/fishercoder/_163Test.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.fishercoder;
22

3-
import com.fishercoder.solutions.MissingRanges;
3+
import com.fishercoder.solutions._163;
44
import org.junit.Before;
55
import org.junit.BeforeClass;
66
import org.junit.Test;
@@ -13,9 +13,9 @@
1313
/**
1414
* Created by fishercoder on 12/31/16.
1515
*/
16-
public class MissingRangesTest {
16+
public class _163Test {
1717

18-
private static MissingRanges test;
18+
private static _163 test;
1919
private static List<String> expected;
2020
private static List<String> actual;
2121
private static int lower;
@@ -24,7 +24,7 @@ public class MissingRangesTest {
2424

2525
@BeforeClass
2626
public static void setup(){
27-
test = new MissingRanges();
27+
test = new _163();
2828
expected = new ArrayList();
2929
actual = new ArrayList();
3030
}

src/test/java/com/fishercoder/NumberofSegmentsinaStringTest.java renamed to src/test/java/com/fishercoder/_434Test.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
package com.fishercoder;
22

3-
import com.fishercoder.solutions.NumberofSegmentsinaString;
3+
import com.fishercoder.solutions._434;
44
import org.junit.Before;
55
import org.junit.BeforeClass;
66
import org.junit.Test;
77

88
import static junit.framework.Assert.assertEquals;
99

10-
public class NumberofSegmentsinaStringTest {
11-
private static NumberofSegmentsinaString test;
10+
public class _434Test {
11+
private static _434 test;
1212
private static int expected;
1313
private static int actual;
1414
private static String s;
1515

1616
@BeforeClass
1717
public static void setup(){
18-
test = new NumberofSegmentsinaString();
18+
test = new _434();
1919
}
2020

2121
@Before

src/test/java/com/fishercoder/NumberComplementTest.java renamed to src/test/java/com/fishercoder/_476Test.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.fishercoder;
22

3-
import com.fishercoder.solutions.NumberComplement;
3+
import com.fishercoder.solutions._476;
44
import org.junit.Before;
55
import org.junit.BeforeClass;
66
import org.junit.Test;
@@ -10,15 +10,15 @@
1010
/**
1111
* Created by fishercoder on 1/14/17.
1212
*/
13-
public class NumberComplementTest {
14-
private static NumberComplement test;
13+
public class _476Test {
14+
private static _476 test;
1515
private static int expected;
1616
private static int actual;
1717
private static int input;
1818

1919
@BeforeClass
2020
public static void setup() {
21-
test = new NumberComplement();
21+
test = new _476();
2222
}
2323

2424
@Before

src/test/java/com/fishercoder/NextGreaterElementITest.java renamed to src/test/java/com/fishercoder/_496Test.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
package com.fishercoder;
22

3-
import com.fishercoder.solutions.NextGreaterElementI;
3+
import com.fishercoder.solutions._496;
44
import org.junit.Before;
55
import org.junit.BeforeClass;
66
import org.junit.Test;
77

88
import static org.junit.Assert.assertArrayEquals;
99

10-
public class NextGreaterElementITest {
11-
private static NextGreaterElementI test;
10+
public class _496Test {
11+
private static _496 test;
1212
private static int[] findNums;
1313
private static int[] nums;
1414
private static int[] expected;
1515
private static int[] actual;
1616

1717
@BeforeClass
1818
public static void setup(){
19-
test = new NextGreaterElementI();
19+
test = new _496();
2020
}
2121

2222
@Before

src/test/java/com/fishercoder/NextGreaterElementIITest.java renamed to src/test/java/com/fishercoder/_503Test.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
package com.fishercoder;
22

3-
import com.fishercoder.solutions.NextGreaterElementII;
3+
import com.fishercoder.solutions._503;
44
import org.junit.Before;
55
import org.junit.BeforeClass;
66
import org.junit.Test;
77

88
import static org.junit.Assert.assertArrayEquals;
99

10-
public class NextGreaterElementIITest {
11-
private static NextGreaterElementII test;
10+
public class _503Test {
11+
private static _503 test;
1212
private static int[] nums;
1313
private static int[] expected;
1414
private static int[] actual;
1515

1616
@BeforeClass
1717
public static void setup(){
18-
test = new NextGreaterElementII();
18+
test = new _503();
1919
}
2020

2121
@Before

src/test/java/com/fishercoder/LongestUncommonSubsequenceIITest.java renamed to src/test/java/com/fishercoder/_522Test.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/**
1010
* Created by fishercoder on 12/31/16.
1111
*/
12-
public class LongestUncommonSubsequenceIITest {
12+
public class _522Test {
1313

1414
private static _522 test;
1515
private static int expected;

src/test/java/com/fishercoder/MinimumTimeDifferenceTest.java renamed to src/test/java/com/fishercoder/_539Test.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.fishercoder;
22

3-
import com.fishercoder.solutions.MinimumTimeDifference;
3+
import com.fishercoder.solutions._539;
44
import org.junit.Before;
55
import org.junit.BeforeClass;
66
import org.junit.Test;
@@ -11,15 +11,15 @@
1111

1212
import static junit.framework.Assert.assertEquals;
1313

14-
public class MinimumTimeDifferenceTest {
15-
private static MinimumTimeDifference test;
14+
public class _539Test {
15+
private static _539 test;
1616
private static int expected;
1717
private static int actual;
1818
private static List<String> timePoints;
1919

2020
@BeforeClass
2121
public static void setup(){
22-
test = new MinimumTimeDifference();
22+
test = new _539();
2323
}
2424

2525
@Before

src/test/java/com/fishercoder/SplitArraywithEqualSumTest.java renamed to src/test/java/com/fishercoder/_548Test.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import static junit.framework.Assert.assertEquals;
99

10-
public class SplitArraywithEqualSumTest {
10+
public class _548Test {
1111
private static _548 test;
1212
private static boolean expected;
1313
private static boolean actual;

src/test/java/com/fishercoder/NextGreaterElementIIITest.java renamed to src/test/java/com/fishercoder/_556Test.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
package com.fishercoder;
22

3-
import com.fishercoder.solutions.NextGreaterElementIII;
3+
import com.fishercoder.solutions._556;
44
import org.junit.Before;
55
import org.junit.BeforeClass;
66
import org.junit.Test;
77

88
import static org.junit.Assert.assertEquals;
99
import static org.junit.Assert.assertTrue;
1010

11-
public class NextGreaterElementIIITest {
12-
private static NextGreaterElementIII test;
11+
public class _556Test {
12+
private static _556 test;
1313
private static int n;
1414
private static int expected;
1515
private static int actual;
1616

1717
@BeforeClass
1818
public static void setup(){
19-
test = new NextGreaterElementIII();
19+
test = new _556();
2020
}
2121

2222
@Before

src/test/java/com/fishercoder/SqrtxTest.java renamed to src/test/java/com/fishercoder/_69Test.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/**
1111
* Created by fishercoder on 1/25/17.
1212
*/
13-
public class SqrtxTest {
13+
public class _69Test {
1414
private static _69 test;
1515
private static int expected;
1616
private static int actual;

0 commit comments

Comments
 (0)