## Sublist Search (Search a linked list in another list)January 18, 2017

Given two linked lists, the task is to check whether the first list is present in 2nd list or not. Input : list1 = 10->20… Read More »

## Partitioning a linked list around a given value and keeping the original orderJanuary 9, 2017

Given a linked list and a value x, partition it such that all nodes less than x come first, then all nodes with value equal… Read More »

## Find pair for given sum in a sorted singly linked without extra spaceNovember 30, 2016

Given a sorted singly linked list and a value x, the task is to find pair whose sum is equal to x. We are not… Read More »

## Find pairs with given sum in doubly linked listNovember 23, 2016

Given a sorted doubly linked list of positive distinct elements, the task is to find pairs in doubly linked list whose sum is equal to… Read More »

## Unrolled Linked List | Set 1 (Introduction)October 18, 2016

Like array and linked list, unrolled Linked List is also a linear data structure and is a variant of linked list. Unlike simple linked list,… Read More »

## Convert a Binary Tree to a Circular Doubly Link ListSeptember 5, 2016

Given a Binary Tree, convert it to a Circular Doubly Linked List (In-Place). The left and right pointers in nodes are to be used as… Read More »

## Subtract Two Numbers represented as Linked ListsAugust 31, 2016

Given two linked lists that represent two large positive numbers. Subtract the smaller number from larger one and return the difference as a linked list.… Read More »

## Rearrange a given list such that it consists of alternating minimum maximum elementsAugust 15, 2016

Given a list of integers, rearrange the list such that it consists of alternating minimum maximum elements using only list operations. The first element of… Read More »

## Flatten a multi-level linked list | Set 2 (Depth wise)July 23, 2016

We have discussed flattening of a multi-level linked list where nodes have two pointers down and next. In the previous post, we flattened the linked… Read More »

## Decimal Equivalent of Binary Linked ListJune 10, 2016

Given a singly linked list of 0s and 1s find its decimal equivalent. Input : 0->0->0->1->1->0->0->1->0 Output : 50 Input : 1->0->0 Output : 4… Read More »

## Merge K sorted linked lists | Set 1

Given K sorted linked lists of size N each, merge them and print the sorted output. Example: Input: k = 3, n = 4 list1… Read More »