Skip to content

Commit 7658804

Browse files
rename
1 parent a4be1b4 commit 7658804

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Your ideas/fixes/algorithms are more than welcome!
166166
|452|[Minimum Number of Arrows to Burst Balloons](https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_452.java) | O(nlogn) |O(1) | Medium| Array, Greedy
167167
|451|[Sort Characters By Frequency](https://leetcode.com/problems/sort-characters-by-frequency/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_451.java) | O(nlogn) |O(n) | Medium| HashMap
168168
|450|[Delete Node in a BST](https://leetcode.com/problems/delete-node-in-a-bst/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_450.java)| O(?)|O(?) | Medium| Tree, Recursion
169-
|449|[Serialize and Deserialize BST](https://leetcode.com/problems/serialize-and-deserialize-bst/)|[Solution](../master/src/main/java/com/fishercoder/solutions/SerializeandDeserializeBST.java)| O(n)|O(h) | Medium| BFS
169+
|449|[Serialize and Deserialize BST](https://leetcode.com/problems/serialize-and-deserialize-bst/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_449.java)| O(n)|O(h) | Medium| BFS
170170
|448|[Find All Numbers Disappeared in an Array](https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_448.java)| O(n)|O(1) | Easy| Array, HashMap
171171
|447|[Number of Boomerangs](https://leetcode.com/problems/number-of-boomerangs/)|[Solution](../master/src/main/java/com/fishercoder/solutions/NumberofBoomerangs.java)| O(n^2)|O(n) | Easy| HashMap
172172
|445|[Add Two Numbers II](https://leetcode.com/problems/add-two-numbers-ii/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_445.java)| O(max(m,n)|O(max(m,n)) | Medium| Stack, LinkedList
@@ -278,7 +278,7 @@ Your ideas/fixes/algorithms are more than welcome!
278278
|321|[Create Maximum Number](https://leetcode.com/problems/create-maximum-number/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_321.java)| O(?)|O(?) | Hard
279279
|320|[Generalized Abbreviation](https://leetcode.com/problems/generalized-abbreviation/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_320.java)| O(n*2^n)|O(n) | Medium| Backtracking, Bit Manipulation
280280
|319|[Bulb Switcher](https://leetcode.com/problems/bulb-switcher/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_319.java)| O(1)|O(1) | Medium| Brainteaser
281-
|317|[Shortest Distance from All Buildings](https://leetcode.com/problems/shortest-distance-from-all-buildings/)|[Solution](../master/src/main/java/com/fishercoder/solutions/ShortestDistanceFromAllBuildings.java)| O(?)|O(?) | Hard|
281+
|317|[Shortest Distance from All Buildings](https://leetcode.com/problems/shortest-distance-from-all-buildings/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_317.java)| O(?)|O(?) | Hard|
282282
|316|[Remove Duplicate Letters](https://leetcode.com/problems/remove-duplicate-letters/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_316.java)| O(n)|O(1)| Hard| Stack, Recursion, Greedy
283283
|315|[Count of Smaller Numbers After Self](https://leetcode.com/problems/count-of-smaller-numbers-after-self/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_315.java)| O(?)|O(?)| Hard| Tree
284284
|314|[Binary Tree Vertical Order Traversal](https://leetcode.com/problems/binary-tree-vertical-order-traversal/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_314.java)| O(n)|O(n) | Medium| HashMap, BFS
@@ -349,7 +349,7 @@ Your ideas/fixes/algorithms are more than welcome!
349349
|248|[Strobogrammatic Number III](https://leetcode.com/problems/strobogrammatic-number-iii/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_248.java) | O(?) | O(?) | Hard | Recursion, DFS
350350
|247|[Strobogrammatic Number II](https://leetcode.com/problems/strobogrammatic-number-ii/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_247.java) | O(n^2) | O(n) | Medium | Recursion
351351
|246|[Strobogrammatic Number](https://leetcode.com/problems/strobogrammatic-number/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_246.java) | O(n) | O(1) | Easy
352-
|245|[Shortest Word Distance III](https://leetcode.com/problems/shortest-word-distance-iii/)|[Solution](../master/src/main/java/com/fishercoder/solutions/ShortestWordDistanceIII.java) | O(n) | O(1) | Medium |
352+
|245|[Shortest Word Distance III](https://leetcode.com/problems/shortest-word-distance-iii/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_245.java) | O(n) | O(1) | Medium |
353353
|244|[Shortest Word Distance II](https://leetcode.com/problems/shortest-word-distance-ii/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_244.java) | O(n) | O(n) | Medium | HashMap
354354
|243|[Shortest Word Distance](https://leetcode.com/problems/shortest-word-distance/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_243.java) | O(n) | O(1) | Easy
355355
|242|[Valid Anagram](https://leetcode.com/problems/valid-anagram/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_242.java) | O(n) | O(1) | Easy
@@ -492,7 +492,7 @@ Your ideas/fixes/algorithms are more than welcome!
492492
|84|[Largest Rectangle in Histogram](https://leetcode.com/problems/largest-rectangle-in-histogram/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_84.java)|O(n) |O(n)|Hard|Array, Stack
493493
|83|[Remove Duplicates from Sorted List](https://leetcode.com/problems/remove-duplicates-from-sorted-list/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_83.java)|O(n) |O(1)|Medium| Linked List
494494
|82|[Remove Duplicates from Sorted List II](https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_82.java)|O(n) |O(1)|Medium| Linked List
495-
|81|[Search in Rotated Sorted Array II](https://leetcode.com/problems/search-in-rotated-sorted-array-ii/)|[Solution](../master/src/main/java/com/fishercoder/solutions/SearchinRotatedSortedArrayII.java)|O(logn)|O(1)|Medium|Binary Search
495+
|81|[Search in Rotated Sorted Array II](https://leetcode.com/problems/search-in-rotated-sorted-array-ii/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_81.java)|O(logn)|O(1)|Medium|Binary Search
496496
|80|[Remove Duplicates from Sorted Array II](https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/)|[Solution](../master/src/main/java/com/fishercoder/solutions/RemoveDuplicatesfromSortedArrayII.java)|O(n) |O(n)|Medium|
497497
|79|[Word Search](https://leetcode.com/problems/word-search/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_79.java)|O(m*n*l) ? |O(m*n)|Medium|Backtracking, DFS
498498
|78|[Subsets](https://leetcode.com/problems/subsets/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_78.java)|O(n^2) ? |O(1)|Medium|Backtracking

src/main/java/com/fishercoder/solutions/ShortestWordDistanceIII.java renamed to src/main/java/com/fishercoder/solutions/_245.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
Note:
1717
You may assume word1 and word2 are both in the list.
1818
*/
19-
public class ShortestWordDistanceIII {
19+
public class _245 {
2020

2121
public int shortestWordDistance(String[] words, String word1, String word2) {
2222
int p1 = -1;
+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The point (1,2) is an ideal empty land to build a house, as the total travel dis
2323
Note:
2424
There will be at least one building. If it is not possible to build such house according to the above rules, return -1.
2525
*/
26-
public class ShortestDistanceFromAllBuildings {
26+
public class _317 {
2727

2828
public int shortestDistance(int[][] grid) {
2929
int m = grid.length;

src/main/java/com/fishercoder/solutions/SerializeandDeserializeBST.java renamed to src/main/java/com/fishercoder/solutions/_449.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1515
Note: Do not use class member/global/static variables to store states. Your serialize and deserialize algorithms should be stateless.
1616
*/
17-
public class SerializeandDeserializeBST {
17+
public class _449 {
1818

1919
// Encodes a tree to a single string.
2020
public String serialize(TreeNode root) {

src/main/java/com/fishercoder/solutions/SearchinRotatedSortedArrayII.java renamed to src/main/java/com/fishercoder/solutions/_81.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
99
Write a function to determine if a given target is in the array.
1010
*/
11-
public class SearchinRotatedSortedArrayII {
11+
public class _81 {
1212

1313
public boolean search(int[] A, int target) {
1414
int len = A.length;

src/test/java/com/fishercoder/SerializeandDeserializeBSTTest.java renamed to src/test/java/com/fishercoder/_449Test.java

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

33
import com.fishercoder.common.classes.TreeNode;
4-
import com.fishercoder.solutions.SerializeandDeserializeBST;
4+
import com.fishercoder.solutions._449;
55
import org.junit.Before;
66
import org.junit.BeforeClass;
77
import org.junit.Test;
88

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

11-
public class SerializeandDeserializeBSTTest {
12-
private static SerializeandDeserializeBST test;
11+
public class _449Test {
12+
private static _449 test;
1313
private static TreeNode actualRoot;
1414
private static TreeNode expectedRoot;
1515

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

2121
@Before

0 commit comments

Comments
 (0)