EasyImplementation of Deque using Doubly Linked ListProblem Statement The problem “Implementation of Deque using Doubly Linked List” states read more
MediumLinked List CycleProblem Statement “Linked List Cycle” problem states that you are given a linked list. read more
Swap Nodes In PairsIn swap nodes in pairs problem, we have given a linked list consisting of n nodes. Swap every node read more
Merge K Sorted Linked ListsMerge K sorted linked lists problem is so famous as per the interview point of view. This question read more
Merge Two Sorted Linked ListsIn merge two sorted linked lists we have given head pointer of two linked lists, merge them such read more
Merge Two Sorted Lists LeetcodeWhat is merge two sorted lists problem on leetcode? This is so interesting question asked so many read more
Reverse Nodes in K-GroupProblem In Reverse Nodes in K-Group problem we have given a linked list, Reverse the linked list in read more
Add two numbersAdd two numbers is a problem in which we have given two non-empty linked list representing a read more
Insert Node in the Sorted Linked ListInsert a new node in the sorted linked list in sorted way After inserting a node in sorted linked read more
Detect a loop in the Linked ListIn the given linked list, find whether there is loop or not If there is a loop in the linked list read more
Find Nth NodeIn the given linked list find nth node. The function should return the data value in the nth node. read more
Swap kth node from beginning with kth node from endIn the given linked list, swap kth node from beginning with kth node from the end. We should not read more
Swap nodes in the linked listWe are given a linked list and two key values, we need to swap these nodes. Example Time complexity read more
Delete last occurrenceIn the given linked list, write a function to delete the last occurrence of a given key from the read more
Check if a linked list of strings form a palindromeGiven a linked list handling string data, write a function to check whether the data forms a read more
Merge two sorted linked lists such that merged list is in reverse orderGiven two linked lists sorted in reverse order, write a function to merge them in such a way that read more
Rearrange a given linked list in-placeGiven a singly linked list L0-> L1-> … -> Ln-1-> Ln. Rearrange the nodes in the list read more
Clone a Linked List with next and random pointerGiven a doubly linked list, in which one pointer is pointing to the next node just like in a singly read more
Construct a Maximum Sum Linked List out of two Sorted Linked Lists having some Common nodesGiven two sorted linked lists, construct a list that contains maximum sum path from start to end. read more
Quick Sort on SIngly Linked ListGiven a linked list, we will sort the linked list using quick sort. Example Linked List before read more
Flatten a multilevel linked listGiven a linked list where in addition to next pointer each node has a child pointer, which may or read more
Rotate a Linked ListGiven a linkedlist and an integer k, write a function to rotate the linked list counter clockwise read more
Union and Intersection of Two Linked ListsGiven two linked lists, find the union and intersection of the elements in two linked lists. read more
Sort linked which is sorted on absolute valuesWrite a function to sort a given linked list which is already sorted based on absolute values. read more
Binary Tree to Doubly linked listConvert the given Binary Tree into a Doubly linked list in-place. The order of nodes should be same read more
Rearrange a linked list in Zig-ZagRearrange a given linked list such that it should be in form a < b > c < d > e < f read more
Clone a linked list with next and random pointer (Hashing)Given linked list each nodes contains : 1. Node data 2. Pointer to next node. 3. Pointer (arbitrary read more
Flattening a linked listIn the given linked list, every node has two pointers : 1. Pointer to next node (Main linked read more
Segregate even and odd nodes in a linked listFor the given input linked list, write a function to segregate all even and all odd such that all read more
Delete a node of a linked list at given positionFor the given linked list write a function to delete a node at the given position. Example Time read more
Compare two strings(linked lists)In the given two linked lists where each node of the list is character. We need to write a function read more
Merge sort better than quick sort for linked listsWhy “Merge Sort” better for linked lists ? And Why “Quick Sort” better for array ? Why read more
Sort a linked list that is sorted alternating ascending and descendingIn the given linked list, the list is in alternating ascending and descending orders. We need to read more
Remove middle points in a linked list of line segmentsIn the given linked list each node consists of co-ordinates (pair of data). These co-ordinates are read more
Can we reverse a linked list in less than O(n) time ?Can we write an algorithm to reverse the given linked list in less than O(n) runtime ? No, we read more
Merge a linked list into another at alternate positionsGiven two linked lists A and B, we need to insert nodes of B into A at alternative positions of read more
Delete N nodes after MIn the given linked list delete N nodes after M nodes, do this till the end of the linked list. read more
Sort a linked list with 0s, 1s and 2sIn the given linked list, which contains only 0s, 1s or 2s. Write a function to sort the linked read more
Triplet from three linked lists with given sumIn the given three linked lists, find one node from each of the three lists such that there sum is read more
Delete a node under given conditionsIn the given linked list write a function to delete a given node. Under conditions : a) Parameter read more
Reverse a Linked List in groupsIn the given linked list, write a function to reverse every set of k nodes. (K is input value) read more
Reverse a singly linked list recursivelyReverse the given singly linked list recursively Example Algorithm Step 1 : create a function that read more
Reverse a Singly Linked List (Iterative/Non-Recursive)Given a linked list, write a program to reverse all the elements in the linked list and display the read more
Remove all duplicates in an unsorted linked listGiven an unsorted linked list, write a program to remove all the duplicate elements in the unsorted read more
Remove all duplicates in a sorted linked listGiven a sorted linked list. We have to remove all the duplicates that are present in the sorted read more
Check if the linked list is palindromeGiven a singly linked list, find whether it’s a palindrome are not Palindrome : an integer or a read more
Find the occurrences of a number in a linked listFind the number of occurrences of a number in the given linked list Occurrences : number of times x read more
Find nth node of the Linked list from the endGiven a linked list, write a program for finding the nth element from the end of the linked list read more
Find middle of the Linked ListGiven a Linked List, write a program to find middle of the linked list Example Input : read more
Insert nodes in a linked list in a sorted way (Ascending Order)In this algorithm, we will insert elements in the linkedlist in a sorted way ie, data values from read more
Check if two linked lists are identicalFind whether the given two linked lists are identical or not To check whether two linked lists are read more
Move last element of the Linked List at first placeIn the given linked list write a program to move last element to front of the linked list Example read more
Delete a node in doubly linked listIn the given doubly linked list, delete a node We can delete head node, middle node or last node. read more
How to Delete a Linked ListGiven a linked list, write a program to delete the linked list completely. That is we will be read more
Split linked list using alternate nodesGiven a linked list, you need to split it into two linked lists with alternate elements in each of read more
Create a Doubly Linked ListWrite a program to Create a doubly linked list A double linked list contains an extra pointer to read more