Skip to content

Commit 50a9f3c

Browse files
edit 143
1 parent 07058a2 commit 50a9f3c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ Your ideas/fixes/algorithms are more than welcome!
418418
|146|[LRU Cache](https://leetcode.com/problems/lru-cache/)|[Doubly Linked List](../master/src/main/java/com/fishercoder/solutions/_146_use_DoublyLinkedList_plus_HashMap.java) |[Linked Hash Map](../master/leetcode-algorithms/src/main/java/com/fishercoder/solutions/_146_use_LinkedHashMap.java)| O(?)|O(?) | Hard| Linked List
419419
|145|[Binary Tree Postorder Traversal](https://leetcode.com/problems/binary-tree-postorder-traversal/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_145.java)| O(n)|O(h) | Hard| Binary Tree
420420
|144|[Binary Tree Preorder Traversal](https://leetcode.com/problems/binary-tree-preorder-traversal/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_144.java)| O(n)|O(h) | Medium| Binary Tree
421-
|143|[Reorder List](https://leetcode.com/problems/reorder-list/)|[Solution](../master/src/main/java/com/fishercoder/solutions/ReorderList.java)| O(n)|O(1) | Medium|
421+
|143|[Reorder List](https://leetcode.com/problems/reorder-list/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_143.java)| O(n)|O(1) | Medium|
422422
|142|[Linked List Cycle II](https://leetcode.com/problems/linked-list-cycle-ii/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_142.java)| O(n)|O(1) | Medium| Linked List
423423
|141|[Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_141.java)| O(n)|O(1) | Easy| Linked List
424424
|140|[Word Break II](https://leetcode.com/problems/word-break-ii/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_140.java)| ? |O(n^2) | Hard| Backtracking/DFS

src/main/java/com/fishercoder/solutions/ReorderList.java renamed to src/main/java/com/fishercoder/solutions/_143.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import com.fishercoder.common.classes.ListNode;
44

55
/**
6+
* 143. Reorder List
7+
*
68
* Given a singly linked list L: L0→L1→…→Ln-1→Ln,
79
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
810
@@ -11,7 +13,7 @@
1113
For example,
1214
Given {1,2,3,4}, reorder it to {1,4,2,3}.
1315
*/
14-
public class ReorderList {
16+
public class _143 {
1517

1618
public void reorderList(ListNode head) {
1719
if (head == null || head.next == null) {

0 commit comments

Comments
 (0)