## Print alternate nodes of a linked list using recursion

Given a linked list, print alternate nodes of this linked list. Examples : Input : 1 -> 2 -> 3 -> 4 -> 5 ->… Read More »

Given a linked list, and a number, check if their exist two numbers whose sum is equal to given number. If there exist two numbers,… Read More »

## Reverse a doubly linked list in groups of given size

Given a doubly linked list containing n nodes. The problem is to reverse every group of k nodes in the list. Examples: Recommended: Please try… Read More »

## Rearrange a linked list in to alternate first and last element

Given a linked list. arrange the linked list in manner of alternate first and last element. Examples: Input : 1->2->3->4->5->6->7->8 Output :1->8->2->7->3->6->4->5 Input :10->11->15->13 Output… Read More »

## Brent’s Cycle Detection Algorithm

Given a linked list, check if the the linked list has loop or not. Below diagram shows a linked list with a loop. We have… Read More »

## Delete a linked list using recursion

Delete the given linked list using recursion Method 1) If head equal to NULL then linked list is empty, we simply return. 2) Recursively delete… Read More »

## Make a loop at k-th position in a linked list

Given a linked list and a position k. Make a loop at k-th position Examples: Input : Given linked list Output : Modified linked list… Read More »

## Self Organizing List : Count Method

Self Organizing list is a list that re-organizes or re-arranges itself for better performance. In a simple list, an item to be searched is looked… Read More »

## Self Organizing List : Move to Front Method

Self Organizing list is a list that re-organizes or re-arranges itself for better performance. In a simple list, an item to be searched is looked… Read More »

## Reverse a Doubly Linked List | Set 4 (Swapping Data)

Given a Doubly Linked List, we are asked to reverse the list in-place without using any extra space. Examples: Input : 1 <–> 2 <–>… Read More »

## Sorted merge of two sorted doubly circular linked lists

Given two sorted Doubly circular Linked List containing n1 and n2 nodes respectively. The problem is to merge the two lists such that resultant list… Read More »