Singly Linked List Problems
Last Updated :
20 Oct, 2024
Improve
Singly linked list is a linear data structure in which the elements are not stored in contiguous memory locations and each element is connected only to its next element using a pointer.
Learn Basics of Singly Linked List:
Basic Operations of Singly Linked List:
- Linked List Insertion
- Search an element in a Linked List (Iterative and Recursive)
- Find Length of a Linked List (Iterative and Recursive)
- Reverse a linked list
- Linked List Deletion (Deleting a given key)
- Linked List Deletion (Deleting a key at given position)
- Write a function to delete a Linked List
Easy Problems on Singly Linked List:
- Identical Linked Lists
- Print the middle of a given linked list
- Write a function to get Nth node in a Linked List
- Nth node from the end of a Linked List
- Move last element to front of a given Linked List
- Make middle node head in a linked list
- Delete alternate nodes of a Linked List
- Add 1 to a number represented as linked list
- Add two numbers represented by linked lists
- Subtract Two Numbers represented as Linked Lists
- Find the sum of last n nodes of the given Linked List
- Pairwise swap elements of a given linked list
- Remove every k-th node of the linked list
- Remove duplicates from a sorted linked list
Intermediate Problems on Singly Linked List:
- Detect loop in a linked list
- Find length of loop in linked list
- Function to check if a singly linked list is palindrome
- Remove duplicates from an unsorted linked list
- Remove all occurrences of duplicates from a sorted Linked List
- Swap nodes in a linked list without swapping data
- Intersection point of two Linked Lists.
- Iteratively Reverse a linked list using only 2 pointers (An Interesting Method)
- Segregate even and odd nodes in a Linked List
- Alternate Odd and Even Nodes in a Singly Linked List
- Rearrange a Linked List in Zig-Zag fashion
- Adding two polynomials using Linked List
- Union and Intersection of two Linked Lists
- Sort linked list which is already sorted on absolute values
Hard Problems on Singly Linked List:
- Reverse a Linked List in groups of given size
- Flattening a Linked List
- Reverse alternate K nodes in a Singly Linked List
- Alternating split of a given Singly Linked List
- Delete nodes which have a greater value on right side
- Given a linked list of line segments, remove middle points
- Clone a linked list with next and random pointer
- Rearrange a given linked list in-place.
- Select a Random Node from a Singly Linked List
- In-place Merge two linked lists without changing links of first list
- Length of longest palindrome list in a linked list using O(1) extra space
- Rotate Linked List block wise
- Count rotations in sorted and rotated linked list