Linked list - cocoder39/coco39_LC GitHub Wiki
two pointers
- 2. Add Two Numbers (dummy, 67. Add Binary)
- 369. Plus One Linked List (dummy)
- 160. Intersection of Two Linked Lists (142. Linked List Cycle II)
- 1650. Lowest Common Ancestor of a Binary Tree III
reverse
- 206. Reverse Linked List (dummy node)
- 92. Reverse Linked List II (dummy node)
- 234. Palindrome Linked List (fast and slow pointers)
reorder
- 24. Swap Nodes in Pairs
- 25. Reverse Nodes in k Group (dummy + reverse)
- 61. Rotate List
- 328. Odd Even Linked List
- 143. Reorder List (partition + reverse + merge)
fast and slow pointers
delete
- 237. Delete Node in a Linked List
- 19. Remove Nth Node From End of List (dummy)
- 203. Remove Linked List Elements (dummy)
- 83. Remove Duplicates from Sorted List
- 82. Remove Duplicates from Sorted List II (two pointers)
sort
- 21. Merge Two Sorted Lists (dummy + merge)
- 23. Merge k Sorted Lists (merge 2 lists/ heap sort)
- 148. Sort List (merge sort)
- 86. Partition List (quick sort partition)
- 147. Insertion Sort List (insertion sort)
deep copy
- 138. Copy List with Random Pointer (dummy)
- 133. Clone Graph (not linked list, dfs)
insertion
skip list