Singly Linked List Problems Last Updated : 20 Oct, 2024 Comments Improve Suggest changes Like Article Like Report 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 Terminologies in Linked ListSingly Linked List TutorialLinked List vs ArrayBasic Operations of Singly Linked List:Linked List InsertionSearch an element in a Linked List (Iterative and Recursive)Find Length of a Linked List (Iterative and Recursive)Reverse a linked listLinked List Deletion (Deleting a given key)Linked List Deletion (Deleting a key at given position)Write a function to delete a Linked ListEasy Problems on Singly Linked List:Identical Linked ListsPrint the middle of a given linked listWrite a function to get Nth node in a Linked ListNth node from the end of a Linked ListMove last element to front of a given Linked ListMake middle node head in a linked listDelete alternate nodes of a Linked ListAdd 1 to a number represented as linked listAdd two numbers represented by linked listsSubtract Two Numbers represented as Linked ListsFind the sum of last n nodes of the given Linked ListPairwise swap elements of a given linked listRemove every k-th node of the linked listRemove duplicates from a sorted linked listIntermediate Problems on Singly Linked List:Detect loop in a linked listFind length of loop in linked listFunction to check if a singly linked list is palindromeRemove duplicates from an unsorted linked listRemove all occurrences of duplicates from a sorted Linked ListSwap nodes in a linked list without swapping dataIntersection 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 ListAlternate Odd and Even Nodes in a Singly Linked ListRearrange a Linked List in Zig-Zag fashionAdding two polynomials using Linked ListUnion and Intersection of two Linked ListsSort linked list which is already sorted on absolute valuesHard Problems on Singly Linked List:Reverse a Linked List in groups of given sizeFlattening a Linked ListReverse alternate K nodes in a Singly Linked ListAlternating split of a given Singly Linked ListDelete nodes which have a greater value on right sideGiven a linked list of line segments, remove middle pointsClone a linked list with next and random pointerRearrange a given linked list in-place.Select a Random Node from a Singly Linked ListIn-place Merge two linked lists without changing links of first listLength of longest palindrome list in a linked list using O(1) extra spaceRotate Linked List block wiseCount rotations in sorted and rotated linked listQuick Links:'Practice Problems' on Linked List'Videos' on Linked List'Quizzes' on Linked List Comment More infoAdvertise with us Next Article Singly Linked List Problems H harendrakumar123 Follow Improve Article Tags : Linked List DSA Practice Tags : Linked List Similar Reads Singly Linked List in Python A Singly Linked List is a type of data structure that is made up of nodes that are created using self-referential structures. Each node contains a data element and a reference (link) to the next node in the sequence. This allows for a dynamic and efficient management of data elements. Table of Conte 10 min read Print Linked List Given a Singly Linked List, the task is to print all the elements in the list.Examples:Input: 1->2->3->4->5->nullOutput: 1 2 3 4 5Explanation: Every element of each node from head node to last node is printed.Input: 10->20->30->40->50->nullOutput: 10 20 30 40 50Explanat 9 min read Traversal of Singly Linked List Traversal of Singly Linked List is one of the fundamental operations, where we traverse or visit each node of the linked list. In this article, we will cover how to traverse all the nodes of a singly linked list along with its implementation. Examples:Input: 1->2->3->4->5->nullOutput: 11 min read Singly Linked List Tutorial A singly linked list is a fundamental data structure, it consists of nodes where each node contains a data field and a reference to the next node in the linked list. The next of the last node is null, indicating the end of the list. Linked Lists support efficient insertion and deletion operations.Un 8 min read Types of Linked List A linked list is a linear data structure, in which the elements are not stored at contiguous memory locations. The elements in a linked list are linked using pointers. In simple words, a linked list consists of nodes where each node contains a data field and a reference(link) to the next node in the 15+ min read Reverse a Linked List Given a linked list, the task is to reverse the linked list by changing the links between nodes.Examples: Input: head: 1 -> 2 -> 3 -> 4 -> NULLOutput: head: 4 -> 3 -> 2 -> 1 -> NULLExplanation: Reversed Linked List: Input: head: 1 -> 2 -> 3 -> 4 -> 5 -> NULLOut 15+ min read Multilevel Linked List Multilevel Linked ListMultilevel Linked List is a 2D data structure that comprises several linked lists and each node in a multilevel linked list has a next and child pointer. All the elements are linked using pointers. multilevel linked list Representation:A multilevel linked list is represented by 8 min read Linked List meaning in DSA A linked list is a linear data structure used for storing a sequence of elements, where each element is stored in a node that contains both the element and a pointer to the next node in the sequence. Linked ListTypes of linked lists: Linked lists can be classified in the following categories Singly 4 min read Basic Terminologies of Linked List Linked List is a linear data structure, in which elements are not stored at a contiguous location, rather they are linked using pointers. Linked List forms a series of connected nodes, where each node stores the data and the address of the next node.Node Structure: A node in a linked list typically 2 min read Reverse a Doubly linked list using recursion Given a doubly linked list. Reverse it using recursion. Original Doubly linked list Reversed Doubly linked list We have discussed Iterative solution to reverse a Doubly Linked List Algorithm: If list is empty, return Reverse head by swapping head->prev and head->next If prev = NULL it means th 9 min read Like