Skip to content

Commit 1d5ef79

Browse files
add 138
1 parent 35a0f61 commit 1d5ef79

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ Your ideas/fixes/algorithms are more than welcome!
309309
|141|[Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/)|[Solution](../master/src/main/java/com/stevesun/solutions/LinkedListCycle.java)| O(n)|O(1) | Easy| Linked List
310310
|140|[Word Break II](https://leetcode.com/problems/word-break-ii/)|[Solution](../master/src/main/java/com/stevesun/solutions/WordBreakII.java)| ? |O(n^2) | Hard| Backtracking/DFS
311311
|139|[Word Break](https://leetcode.com/problems/word-break/)|[Solution](../master/src/main/java/com/stevesun/solutions/WordBreak.java)| O(n^2)|O(n) | Medium| DP
312-
|138|[Copy List with Random Pointer](https://leetcode.com/problems/copy-list-with-random-pointer/)|[Solution](../master/src/main/java/com/stevesun/solutions/CopyListWithRandomPointer.java)| O(?)|O(?) | Medium|
312+
|138|[Copy List with Random Pointer](https://leetcode.com/problems/copy-list-with-random-pointer/)|[Solution](../master/src/main/java/com/stevesun/solutions/_138.java)| O(n)|O(n) | Medium| LinkedList, HashMap
313313
|137|[Single Number II](https://leetcode.com/problems/single-number-ii/)|[Solution](../master/src/main/java/com/stevesun/solutions/SingleNumberII.java)| O(n)|O(n) | Medium|
314314
|135|[Candy](https://leetcode.com/problems/candy/)|[Solution](../master/src/main/java/com/stevesun/solutions/Candy.java)| O(n)|O(1) | Hard| Greedy
315315
|133|[Clone Graph](https://leetcode.com/problems/clone-graph/)|[Solution](../master/src/main/java/com/stevesun/solutions/CloneGraph.java)| O(n)|O(n) | Medium| HashMap, BFS, Graph

src/main/java/com/stevesun/solutions/CopyListWithRandomPointer.java renamed to src/main/java/com/stevesun/solutions/_138.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
Return a deep copy of the list.*/
99

10-
public class CopyListWithRandomPointer {
10+
public class _138 {
1111

1212
public RandomListNode copyRandomList(RandomListNode head) {
1313
Map<RandomListNode, RandomListNode> map = new HashMap();
@@ -36,4 +36,4 @@ class RandomListNode {
3636
int label;
3737
RandomListNode next, random;
3838
RandomListNode(int x) { this.label = x; }
39-
};
39+
}

0 commit comments

Comments
 (0)