Linked List Important Questions
Important concepts:
- Finding length of the linked list
- Reversing a section (or entire) of the linked list
- Finding middle of linked list
- Edge cases (null especially)
- Slow and fast pointers
Easy/Medium
- https://leetcode.com/problems/linked-list-cycle
- https://leetcode.com/problems/linked-list-cycle-ii
- https://leetcode.com/problems/reorder-list (Try to do it without using extra space)
- https://www.interviewbit.com/problems/remove-duplicates-from-sorted-list/
- https://www.interviewbit.com/problems/merge-two-sorted-lists/
- https://www.interviewbit.com/problems/remove-nth-node-from-list-end/
- https://www.interviewbit.com/problems/k-reverse-linked-list/ (A nice problem asked multiple times)
- https://www.interviewbit.com/problems/swap-list-nodes-in-pairs/
- https://www.interviewbit.com/problems/rotate-list/
- https://practice.geeksforgeeks.org/problems/check-if-linked-list-is-pallindrome/1
Hard
- https://leetcode.com/problems/copy-list-with-random-pointer (IMP)
- https://www.interviewbit.com/problems/remove-duplicates-from-sorted-list-ii/
- https://www.interviewbit.com/problems/lru-cache/ (IMPORTANT asked in a lot of interviews)