Skip to content

Commit ddd63f5

Browse files
rename
1 parent d8e43bd commit ddd63f5

File tree

19 files changed

+38
-150
lines changed

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

Lines changed: 1 addition & 1 deletion
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>();
Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 0 additions & 54 deletions
This file was deleted.

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

Lines changed: 0 additions & 58 deletions
This file was deleted.

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

Lines changed: 4 additions & 4 deletions
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
}

0 commit comments

Comments
 (0)