Skip to content

Commit ddc504b

Browse files
rename
1 parent ddd63f5 commit ddc504b

File tree

20 files changed

+90
-76
lines changed

20 files changed

+90
-76
lines changed

README.md

Lines changed: 18 additions & 14 deletions
Large diffs are not rendered by default.

src/main/java/com/fishercoder/solutions/MinimumUniqueWordAbbreviation.java

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
1010
The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.*/
1111

12-
public class MinimumDepthofBinaryTree {
12+
public class _111 {
1313
/**We can solve this problem using both BFS and DFS:
1414
* DFS is to visit every single root to leaf path and return the shortest one.
1515
* BFS is to visit every level and return whenever we find the first leaf node.*/
@@ -23,7 +23,7 @@ public int minDepth(TreeNode root) {
2323
}
2424

2525
public static void main(String[] args){
26-
MinimumDepthofBinaryTree test = new MinimumDepthofBinaryTree();
26+
_111 test = new _111();
2727
TreeNode root = new TreeNode(1);
2828
root.left = new TreeNode(2);
2929
root.right = new TreeNode(3);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
Your algorithm should run in O(n) complexity.
1212
*/
13-
public class LongestConsecutiveSequence {
13+
public class _128 {
1414
//inspired by this solution: https://discuss.leetcode.com/topic/29286/my-java-solution-using-unionfound
1515
public int longestConsecutive(int[] nums) {
1616
Map<Integer, Integer> map = new HashMap();//<value, index>

src/main/java/com/fishercoder/solutions/PalindromePartitioning.java renamed to src/main/java/com/fishercoder/solutions/_131.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
["aa","b"],
1515
["a","a","b"]
1616
]*/
17-
public class PalindromePartitioning {
17+
public class _131 {
1818

1919
public List<List<String>> partition(String s) {
2020
List<List<String>> result = new ArrayList();
@@ -59,7 +59,7 @@ void backtracking(String s, int start, boolean[][] dp, List<String> temp,
5959

6060

6161
public static void main(String...strings){
62-
PalindromePartitioning test = new PalindromePartitioning();
62+
_131 test = new _131();
6363
String s = "aab";
6464
List<List<String>> result = test.partition(s);
6565
for(List<String> list : result){
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Return 1 since the palindrome partitioning ["aa","b"] could be produced using 1 cut.
99
1010
*/
11-
public class PalindromePartitioningII {
11+
public class _132 {
1212
/**This solution is cooler than Jiuzhang: https://discuss.leetcode.com/topic/32575/easiest-java-dp-solution-97-36*/
1313

1414
//cut[i] stands for the minimum number of cut needed to cut [0, i] into palindromes
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
package com.fishercoder.solutions;
22

3-
43
import com.fishercoder.common.classes.ListNode;
54
import com.fishercoder.common.utils.CommonUtils;
65

7-
/**203. Remove Linked List Elements QuestionEditorial Solution My Submissions
8-
Total Accepted: 74027
9-
Total Submissions: 249238
10-
Difficulty: Easy
6+
/**203. Remove Linked List Elements
7+
*
118
Remove all elements from a linked list of integers that have value val.
129
1310
Example
1411
Given: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6
1512
Return: 1 --> 2 --> 3 --> 4 --> 5*/
16-
public class RemoveLinkedListElements {
13+
public class _203 {
1714
/**This is a very good question to test your understanding of pointers/memory/addresses, although it's marked as EASY.
1815
* All the three nodes: dummy, curr and prev are indispensable.
1916
@@ -42,7 +39,7 @@ public ListNode removeElements(ListNode head, int val) {
4239
}
4340

4441
public static void main(String...strings){
45-
RemoveLinkedListElements test = new RemoveLinkedListElements();
42+
_203 test = new _203();
4643
int val = 6;
4744
ListNode head = new ListNode(1);
4845
head.next = new ListNode(2);

src/main/java/com/fishercoder/solutions/MinimumSizeSubarraySum.java renamed to src/main/java/com/fishercoder/solutions/_209.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
More practice:
1212
If you have figured out the O(n) solution, try coding another solution of which the time complexity is O(n log n).
1313
*/
14-
public class MinimumSizeSubarraySum {
14+
public class _209 {
1515

1616
public int minSubArrayLen(int s, int[] nums) {
1717
if(nums == null || nums.length == 0) return 0;

src/main/java/com/fishercoder/solutions/NumberofDigitOne.java renamed to src/main/java/com/fishercoder/solutions/_233.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
1212
Beware of overflow.
1313
*/
14-
public class NumberofDigitOne {
14+
public class _233 {
1515

1616
public int countDigitOne(int n) {
1717
int count = 0;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The above rectangle (with the red border) is defined by (row1, col1) = (2, 1) an
2323
There are many calls to sumRegion function.
2424
You may assume that row1 ≤ row2 and col1 ≤ col2.
2525
*/
26-
public class RangeSumQuery2DImmutable {
26+
public class _304 {
2727

2828
public class NumMatrix {
2929

0 commit comments

Comments
 (0)