Given a linked list, rearrange it by separating odd nodes from even ones. All even nodes should come before all odd nodes in the output list and the relative order of even and odd nodes should be maintained.
Given an unsorted linked list, write a function which deletes any duplicate nodes from the list by traversing the list only once.
Given an linked list of integers, rearrange it such that every second node of the linked list is greater than its left and right nodes. In other words, rearrange linked list node in alternating high-low.
In this post, we will discuss the differences between ArrayList and LinkedList in Java.
Given a linked list containing 0’s, 1’s and 2’s, sort linked list by doing single traversal of it.
In this post, we will see how to detect cycle in a a linked list using Hashing and 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.
Given a linked list, move its last node to the front.
Given 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 …
Given 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.
Given a linked list and two positive integers M and N, delete every N nodes in it after skipping M nodes.
Write 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.