## Divide the given linked list in two lists of size ratio p:q

Given a linked list and two integers p and q, the task is to divide the linked list in the ratio p:q i.e. the first… Read More »

## Create a linked list from two linked lists by choosing max element at each position

Given two linked list of equal sizes, the task is to create new linked list using those linked lists where at every step, the maximum… Read More »

## Create linked list from a given array

Given an array arr[] of size N. The task is to create linked list from the given array. Examples: Input : arr[]={1, 2, 3, 4,… Read More »

## Sum of all odd frequency nodes of the Linked List

Given a linked list, the task is to find the sum of all the odd frequency nodes from the given linked list. Examples: Input: 8… Read More »

## Sum of smaller elements of nodes in a linked list

Given a linked list, every node of which consists of a pair of integer variables first and second to hold the data, and a pointer… Read More »

## Sum of all distinct nodes in a linked list

Given a linked list and it may consist of duplicate nodes. The task is to find the sum of non-duplicate nodes. Examples: Input: 1 ->… Read More »

## Bubble Sort for Linked List by Swapping nodes

Given a singly linked list, sort it using bubble sort by swapping nodes. Example: Input: 10->30->20->5 Output: 5->10->20->30 Input: 20->4->3 Output: 3->4->20 Recommended: Please try… Read More »

## Insert N elements in a Linked List one after other at middle position

Given an array of N elements. The task is to insert the given elements at the middle position in the linked list one after another.… Read More »

## Iterative selection sort for linked list

Given a linked list, the task is to sort the linked list in ascending order by using selection sort. Examples: Input : 1->4->2->2->3 Output :… Read More »

## Check whether the sum of element of a node is equal to the given key value

Given an integer k and a linked list, every node of which consists of a pair of integer variable first and second to hold the… Read More »

## Sum of nodes in a linked list which are greater than next node

Given a linked list, the task is to find the sum of all the nodes which are greater than the node next to them. Note… Read More »

## Find sum of even and odd nodes in a linked list

Given a linked list, the task is to find the sum of even and odd nodes in it separately. Examples: Input: 1 -> 2 ->… Read More »

## Linked List Implementation in C#

A LinkedList is a linear data structure which stores element in the non-contiguous location. The elements in a linked list are linked with each other… Read More »

## Program to unfold a folded linked list

A linked list L0 -> L1 -> L2 -> ….. -> LN can be folded as L0 -> LN -> L1 -> LN – 1… Read More »

## Correct the Random Pointer in Doubly Linked List

Given a doubly linked list having exactly one of the node pointing to a random node in the list, the task is to correct this… Read More »