## Sort linked list containing 0’s, 1’s and 2’s

Given a linked list containing 0’s, 1’s and 2’s, sort linked list by doing single traversal of it.

Read More Sort linked list containing 0’s, 1’s and 2’sCoding made easy

Given a linked list containing 0’s, 1’s and 2’s, sort linked list by doing single traversal of it.

Read More Sort linked list containing 0’s, 1’s and 2’sGiven a linked list, detect cycle in it.

Read More Detect Cycle in a linked list (Floyd’s Cycle Detection Algorithm)Given a linked list, split it into two lists where each list contains alternating elements from the original list and then finally join them back together.

Read More Rearrange the linked list in specific mannerGiven a linked list, move its last node to the front.

Read More Move last node to front in a given Linked ListGiven a linked list, check if linked list is palindrome or not. Simple solution would be to create clone of the linked list, reverse it and check if both linked lists are equal or not. This approach requires three traversals of the linked list and requires extra space for storing duplicates list. Email …

Read More Check if linked list is palindrome or notGiven a linked list, rearrange the nodes in specific way in linear time and constant space. The alternate positions in the output list should be filled with the nodes starting from the beginning and from the very end of the original list respectively.

Read More Rearrange linked list in specific manner in linear timeGiven a linked list and two positive integers M and N, delete every N nodes in it after skipping M nodes.

Read More Delete every N nodes in a linked list after skipping M nodesWrite a function that takes two lists, each of which is sorted in increasing order, and merges the two together into one list which is in decreasing order and return it. In other words, merge two sorted linked lists from their end.

Read More Merge two sorted linked lists from their endGiven two linked lists, merge their nodes together into first list by taking nodes alternately between the two lists. If first list runs out, remaining nodes of second list should not be moved.

Read More Merge alternate nodes of two linked lists into the first listGiven a linked list and a positive integer K, find K’th node from the end in a linked list.

Read More Find K’th node from the end in a linked listGiven a linked list, reverse every adjacent group of k nodes in it where k is given positive integer.

Read More Reverse every group of k nodes in given linked listGiven a singly list it, reverse it using recursion.

Read More Reverse linked list | Part 2 (Recursive Solution)Given a singly linked list it, reverse it.

Read More Reverse linked list | Part 1 (Iterative Solution)Given two lists sorted in increasing order, create and return a new list representing the intersection of the two lists. The new list should be made with its own memory — the original lists should not be changed.

Read More Intersection of two given sorted linked lists