90% of the Linked List questions on linked list classified into Types
Anonymous User
9222
Aug 16, 2022
Aug 25, 2022
Linked List
https://leetcode.com/problems/design-linked-list/
Normal Recursion(Given 1 LL)
-
Simple Recursion Nothing else
-
Modifying the LL But the number of Nodes will be same
- Reversing the Linked List
- Reordering the Nodes
-
Delete Nodes
- https://leetcode.com/problems/remove-nth-node-from-end-of-list/
- https://leetcode.com/problems/remove-duplicates-from-sorted-list/ - if asked to remove duplicates from unsorted list then Use HashMap. (Q in HashMap section)
- https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/
- https://leetcode.com/problems/remove-linked-list-elements/
-
Insert Node
1.https://leetcode.com/problems/insert-into-a-sorted-circular-linked-list
Given 2 or more LL
- https://leetcode.com/problems/add-two-numbers/
- https://leetcode.com/problems/add-two-numbers-ii
- https://leetcode.com/problems/merge-two-sorted-lists/
- https://leetcode.com/problems/merge-k-sorted-lists/ - IMP
- https://leetcode.com/problems/intersection-of-two-linked-lists/
- https://leetcode.com/problems/add-two-polynomials-represented-as-linked-lists/
Fast Pointer Slow Pointer(Cycle or middle ele)
- https://leetcode.com/problems/linked-list-cycle/
- https://leetcode.com/problems/middle-of-the-linked-list/
- https://leetcode.com/problems/delete-the-middle-node-of-a-linked-list/
- https://leetcode.com/problems/linked-list-cycle-ii/
Hash Table
- https://leetcode.com/problems/copy-list-with-random-pointer/ - IMP
- https://leetcode.com/problems/remove-duplicates-from-an-unsorted-linked-list/ - If asked in sorted then no need of hash table.
Design Some data struct using LL
- https://leetcode.com/problems/lru-cache/
- https://leetcode.com/problems/design-hashmap/
- https://leetcode.com/problems/max-stack/
- https://leetcode.com/problems/design-hashset/
- https://leetcode.com/problems/design-browser-history - stk
- https://leetcode.com/problems/design-twitter - no need of LL
- https://leetcode.com/problems/design-circular-queue
Murge Sort on List
LL + Tree Q's
- https://leetcode.com/problems/convert-binary-search-tree-to-sorted-doubly-linked-list/
- https://leetcode.com/problems/flatten-a-multilevel-doubly-linked-list/
https://leetcode.com/problems/maximum-twin-sum-of-a-linked-list/
https://leetcode.com/problems/delete-node-in-a-linked-list/
To Do :
https://leetcode.com/problems/all-oone-data-structure
https://leetcode.com/problems/lfu-cache
https://leetcode.com/problems/design-a-text-editor
Comments (5)

